* clean out some warnings (unrefenced vars mainly)
authorNathan Letwory <nathan@letworyinteractive.com>
Sun, 6 Sep 2009 14:32:02 +0000 (14:32 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Sun, 6 Sep 2009 14:32:02 +0000 (14:32 +0000)
intern/audaspace/FX/AUD_DoubleReader.cpp
intern/audaspace/FX/AUD_PingPongFactory.cpp
intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
intern/audaspace/SDL/AUD_SDLMixerReader.cpp
intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
intern/audaspace/intern/AUD_C-API.cpp
intern/audaspace/jack/AUD_JackDevice.cpp

index 181e394da983d4bc6af077ede5aa5f6c81f2268e..8d3afbf2f1df2a8609620676ef78defad9bba885 100644 (file)
@@ -47,7 +47,7 @@ AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1,
                        AUD_THROW(AUD_ERROR_READER);
        }
 
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                if(reader1)
                {
index a030d581b1aa8528553314c850fa911496f09d39..8b72afe05e72468c56036e02b5b6b9224155a77f 100644 (file)
@@ -46,7 +46,7 @@ AUD_IReader* AUD_PingPongFactory::createReader()
                {
                        reader2 = factory.createReader();
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                        reader2 = 0;
                }
index f94b11a11b85c12a66ae3cfb6ed90ae44976aff1..b33afa2b955e6ab09b2f23734bd61ea064861523 100644 (file)
@@ -544,13 +544,13 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
                                        if(alGetError() != AL_NO_ERROR)
                                                AUD_THROW(AUD_ERROR_OPENAL);
                                }
-                               catch(AUD_Exception e)
+                               catch(AUD_Exception)
                                {
                                        alDeleteSources(1, &sound->source);
                                        throw;
                                }
                        }
-                       catch(AUD_Exception e)
+                       catch(AUD_Exception)
                        {
                                delete sound; AUD_DELETE("handle")
                                alcProcessContext(m_context);
@@ -648,19 +648,19 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
                                if(alGetError() != AL_NO_ERROR)
                                        AUD_THROW(AUD_ERROR_OPENAL);
                        }
-                       catch(AUD_Exception e)
+                       catch(AUD_Exception)
                        {
                                alDeleteSources(1, &sound->source);
                                throw;
                        }
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                        alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers);
                        throw;
                }
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                delete sound; AUD_DELETE("handle")
                delete reader; AUD_DELETE("reader")
@@ -1051,13 +1051,13 @@ bool AUD_OpenALDevice::setCapability(int capability, void *value)
                                                if(alGetError() != AL_NO_ERROR)
                                                        AUD_THROW(AUD_ERROR_OPENAL);
                                        }
-                                       catch(AUD_Exception e)
+                                       catch(AUD_Exception)
                                        {
                                                alDeleteBuffers(1, &bf->buffer);
                                                throw;
                                        }
                                }
-                               catch(AUD_Exception e)
+                               catch(AUD_Exception)
                                {
                                        delete bf; AUD_DELETE("bufferedfactory")
                                        delete reader; AUD_DELETE("reader")
index ec61f99f02deac0b2c3f89b20d82f495506f0def..0a47e36533ae836bff5aca90dc95dcb8053b8a49 100644 (file)
@@ -87,7 +87,7 @@ AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
                                                         specs.rate) == -1)
                        AUD_THROW(AUD_ERROR_SDL);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                delete m_reader; AUD_DELETE("reader")
                throw;
index d70a9c25bcbe128d5ded05abb6ecd49b1b675b32..0384ba5e0e660ba05ad616824d0cdfedb610f651 100644 (file)
@@ -119,7 +119,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
                // find audio stream and codec
                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)
                                && (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.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                av_close_input_file(m_formatCtx);
                throw;
@@ -188,7 +188,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
                // find audio stream and codec
                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)
                                && (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.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                av_close_input_stream(m_formatCtx);
                av_free(m_byteiocontext); AUD_DELETE("byteiocontext")
index 995d4c5f99e55af79886f74b2d3ac46af1affb95..7a624aa53fdb71660455afec0bf9afff5e0a9f15 100644 (file)
@@ -116,7 +116,7 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
 
                return true;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -204,7 +204,7 @@ AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
        {
                return new AUD_StreamBufferFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -218,7 +218,7 @@ AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay)
        {
                return new AUD_DelayFactory(sound, delay);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                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);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -246,7 +246,7 @@ AUD_Sound* AUD_pingpongSound(AUD_Sound* sound)
        {
                return new AUD_PingPongFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -260,7 +260,7 @@ AUD_Sound* AUD_loopSound(AUD_Sound* sound)
        {
                return new AUD_LoopFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -278,7 +278,7 @@ int AUD_stopLoop(AUD_Handle* handle)
                {
                        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);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -360,7 +360,7 @@ AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep)
                else
                        return AUD_device->play(sound, keep);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -376,7 +376,7 @@ int AUD_updateListener(AUD_3DData* data)
                if(AUD_3ddevice)
                        return AUD_3ddevice->updateListener(*data);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return false;
@@ -391,7 +391,7 @@ int AUD_set3DSetting(AUD_3DSetting setting, float value)
                if(AUD_3ddevice)
                        return AUD_3ddevice->setSetting(setting, value);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return false;
@@ -406,7 +406,7 @@ float AUD_get3DSetting(AUD_3DSetting setting)
                if(AUD_3ddevice)
                        return AUD_3ddevice->getSetting(setting);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return 0.0;
@@ -424,7 +424,7 @@ int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data)
                        if(AUD_3ddevice)
                                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)
                                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)
                                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);
                }
-               catch(AUD_Exception e) {}
+               catch(AUD_Exception) {}
        }
        return false;
 }
@@ -499,7 +499,7 @@ int AUD_setSoundPitch(AUD_Handle* handle, float pitch)
                {
                        return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps);
                }
-               catch(AUD_Exception e) {}
+               catch(AUD_Exception) {}
        }
        return false;
 }
@@ -510,7 +510,7 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
        {
                return new AUD_ReadDevice(specs);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -525,7 +525,7 @@ int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
        {
                return device->play(sound) != NULL;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -540,7 +540,7 @@ int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)
        {
                return device->read(buffer, length);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -554,7 +554,7 @@ void AUD_closeReadDevice(AUD_Device* device)
        {
                delete device;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
 }
index 445e68e1a9ae90f7bbc25df9148c98c0fb744190..4d8ab93d6723db2472cfe283da40b80f4fa0ca7d 100644 (file)
@@ -35,7 +35,7 @@
 int AUD_JackDevice::jack_mix(jack_nframes_t length, void *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)
                device->m_buffer->resize(samplesize * 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;
        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);
-               for(int j = 0; j < length; j++)
+               for(unsigned int j = 0; j < length; j++)
                        out[j] = in[j * count + i];
        }
 
@@ -105,7 +105,7 @@ AUD_JackDevice::AUD_JackDevice(AUD_Specs specs)
                if(jack_activate(m_client))
                        AUD_THROW(AUD_ERROR_JACK);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                jack_client_close(m_client);
                delete[] m_ports; AUD_DELETE("jack_port")