* clean out some warnings (unrefenced vars mainly)

This commit is contained in:
Nathan Letwory
2009-09-06 14:32:02 +00:00
parent fb649d5824
commit 3d64d65ad9
7 changed files with 39 additions and 39 deletions

View File

@@ -47,7 +47,7 @@ AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1,
AUD_THROW(AUD_ERROR_READER); AUD_THROW(AUD_ERROR_READER);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
if(reader1) if(reader1)
{ {

View File

@@ -46,7 +46,7 @@ AUD_IReader* AUD_PingPongFactory::createReader()
{ {
reader2 = factory.createReader(); reader2 = factory.createReader();
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
reader2 = 0; reader2 = 0;
} }

View File

@@ -544,13 +544,13 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
if(alGetError() != AL_NO_ERROR) if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL); AUD_THROW(AUD_ERROR_OPENAL);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
alDeleteSources(1, &sound->source); alDeleteSources(1, &sound->source);
throw; throw;
} }
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
delete sound; AUD_DELETE("handle") delete sound; AUD_DELETE("handle")
alcProcessContext(m_context); alcProcessContext(m_context);
@@ -648,19 +648,19 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
if(alGetError() != AL_NO_ERROR) if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL); AUD_THROW(AUD_ERROR_OPENAL);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
alDeleteSources(1, &sound->source); alDeleteSources(1, &sound->source);
throw; throw;
} }
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers);
throw; throw;
} }
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
delete sound; AUD_DELETE("handle") delete sound; AUD_DELETE("handle")
delete reader; AUD_DELETE("reader") delete reader; AUD_DELETE("reader")
@@ -1051,13 +1051,13 @@ bool AUD_OpenALDevice::setCapability(int capability, void *value)
if(alGetError() != AL_NO_ERROR) if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL); AUD_THROW(AUD_ERROR_OPENAL);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
alDeleteBuffers(1, &bf->buffer); alDeleteBuffers(1, &bf->buffer);
throw; throw;
} }
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
delete bf; AUD_DELETE("bufferedfactory") delete bf; AUD_DELETE("bufferedfactory")
delete reader; AUD_DELETE("reader") delete reader; AUD_DELETE("reader")

View File

@@ -87,7 +87,7 @@ AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
specs.rate) == -1) specs.rate) == -1)
AUD_THROW(AUD_ERROR_SDL); AUD_THROW(AUD_ERROR_SDL);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
delete m_reader; AUD_DELETE("reader") delete m_reader; AUD_DELETE("reader")
throw; throw;

View File

@@ -119,7 +119,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
// find audio stream and codec // find audio stream and codec
m_stream = -1; m_stream = -1;
for(int i = 0; i < m_formatCtx->nb_streams; i++) for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
&& (m_stream < 0)) && (m_stream < 0))
{ {
@@ -146,7 +146,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt); m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate; m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
av_close_input_file(m_formatCtx); av_close_input_file(m_formatCtx);
throw; throw;
@@ -188,7 +188,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
// find audio stream and codec // find audio stream and codec
m_stream = -1; m_stream = -1;
for(int i = 0; i < m_formatCtx->nb_streams; i++) for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
&& (m_stream < 0)) && (m_stream < 0))
{ {
@@ -215,7 +215,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt); m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate; m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
av_close_input_stream(m_formatCtx); av_close_input_stream(m_formatCtx);
av_free(m_byteiocontext); AUD_DELETE("byteiocontext") av_free(m_byteiocontext); AUD_DELETE("byteiocontext")

View File

@@ -116,7 +116,7 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
return true; return true;
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return false; return false;
} }
@@ -204,7 +204,7 @@ AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
{ {
return new AUD_StreamBufferFactory(sound); return new AUD_StreamBufferFactory(sound);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -218,7 +218,7 @@ AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay)
{ {
return new AUD_DelayFactory(sound, delay); return new AUD_DelayFactory(sound, delay);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -232,7 +232,7 @@ extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end)
{ {
return new AUD_LimiterFactory(sound, start, end); return new AUD_LimiterFactory(sound, start, end);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -246,7 +246,7 @@ AUD_Sound* AUD_pingpongSound(AUD_Sound* sound)
{ {
return new AUD_PingPongFactory(sound); return new AUD_PingPongFactory(sound);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -260,7 +260,7 @@ AUD_Sound* AUD_loopSound(AUD_Sound* sound)
{ {
return new AUD_LoopFactory(sound); return new AUD_LoopFactory(sound);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -278,7 +278,7 @@ int AUD_stopLoop(AUD_Handle* handle)
{ {
return AUD_device->sendMessage(handle, message); return AUD_device->sendMessage(handle, message);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
} }
@@ -299,7 +299,7 @@ AUD_Handle* AUD_play(AUD_Sound* sound, int keep)
{ {
return AUD_device->play(sound, keep); return AUD_device->play(sound, keep);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -360,7 +360,7 @@ AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep)
else else
return AUD_device->play(sound, keep); return AUD_device->play(sound, keep);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -376,7 +376,7 @@ int AUD_updateListener(AUD_3DData* data)
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->updateListener(*data); return AUD_3ddevice->updateListener(*data);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
return false; return false;
@@ -391,7 +391,7 @@ int AUD_set3DSetting(AUD_3DSetting setting, float value)
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->setSetting(setting, value); return AUD_3ddevice->setSetting(setting, value);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
return false; return false;
@@ -406,7 +406,7 @@ float AUD_get3DSetting(AUD_3DSetting setting)
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->getSetting(setting); return AUD_3ddevice->getSetting(setting);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
return 0.0; return 0.0;
@@ -424,7 +424,7 @@ int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data)
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->updateSource(handle, *data); return AUD_3ddevice->updateSource(handle, *data);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
} }
@@ -443,7 +443,7 @@ int AUD_set3DSourceSetting(AUD_Handle* handle,
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->setSourceSetting(handle, setting, value); return AUD_3ddevice->setSourceSetting(handle, setting, value);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
} }
@@ -461,7 +461,7 @@ float AUD_get3DSourceSetting(AUD_Handle* handle, AUD_3DSourceSetting setting)
if(AUD_3ddevice) if(AUD_3ddevice)
return AUD_3ddevice->getSourceSetting(handle, setting); return AUD_3ddevice->getSourceSetting(handle, setting);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
} }
@@ -481,7 +481,7 @@ int AUD_setSoundVolume(AUD_Handle* handle, float volume)
{ {
return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps); return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps);
} }
catch(AUD_Exception e) {} catch(AUD_Exception) {}
} }
return false; return false;
} }
@@ -499,7 +499,7 @@ int AUD_setSoundPitch(AUD_Handle* handle, float pitch)
{ {
return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps); return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps);
} }
catch(AUD_Exception e) {} catch(AUD_Exception) {}
} }
return false; return false;
} }
@@ -510,7 +510,7 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
{ {
return new AUD_ReadDevice(specs); return new AUD_ReadDevice(specs);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return NULL; return NULL;
} }
@@ -525,7 +525,7 @@ int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
{ {
return device->play(sound) != NULL; return device->play(sound) != NULL;
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return false; return false;
} }
@@ -540,7 +540,7 @@ int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)
{ {
return device->read(buffer, length); return device->read(buffer, length);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
return false; return false;
} }
@@ -554,7 +554,7 @@ void AUD_closeReadDevice(AUD_Device* device)
{ {
delete device; delete device;
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
} }
} }

View File

@@ -35,7 +35,7 @@
int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data) int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
{ {
AUD_JackDevice* device = (AUD_JackDevice*)data; AUD_JackDevice* device = (AUD_JackDevice*)data;
int samplesize = AUD_SAMPLE_SIZE(device->m_specs); unsigned int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
if(device->m_buffer->getSize() < samplesize * length) if(device->m_buffer->getSize() < samplesize * length)
device->m_buffer->resize(samplesize * length); device->m_buffer->resize(samplesize * length);
device->mix(device->m_buffer->getBuffer(), length); device->mix(device->m_buffer->getBuffer(), length);
@@ -44,10 +44,10 @@ int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
float* out; float* out;
int count = device->m_specs.channels; int count = device->m_specs.channels;
for(int i = 0; i < count; i++) for(unsigned int i = 0; i < count; i++)
{ {
out = (float*)jack_port_get_buffer(device->m_ports[i], length); out = (float*)jack_port_get_buffer(device->m_ports[i], length);
for(int j = 0; j < length; j++) for(unsigned int j = 0; j < length; j++)
out[j] = in[j * count + i]; out[j] = in[j * count + i];
} }
@@ -105,7 +105,7 @@ AUD_JackDevice::AUD_JackDevice(AUD_Specs specs)
if(jack_activate(m_client)) if(jack_activate(m_client))
AUD_THROW(AUD_ERROR_JACK); AUD_THROW(AUD_ERROR_JACK);
} }
catch(AUD_Exception e) catch(AUD_Exception)
{ {
jack_client_close(m_client); jack_client_close(m_client);
delete[] m_ports; AUD_DELETE("jack_port") delete[] m_ports; AUD_DELETE("jack_port")