diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
commit | 95da34aa071d64b21ef3e952b987ba3dcee84ca0 (patch) | |
tree | eabf4399e40fd270714c53d40688eadadfd4c5ff /libao2 | |
parent | f394231f5de9d1ff679f1b2da4d1f1b303ae914a (diff) | |
parent | 3961e12fca2f1ec10c64e3ff298828feecca52c9 (diff) |
Merge svn changes up to r29532
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_alsa.c | 2 | ||||
-rw-r--r-- | libao2/ao_coreaudio.c | 3 | ||||
-rw-r--r-- | libao2/ao_sdl.c | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index d71600e183..92e827ea7e 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -210,6 +210,7 @@ static int control(int cmd, void *arg) if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, set_vol)) < 0) { mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Error setting left channel, %s\n", snd_strerror(err)); + snd_mixer_close(handle); return CONTROL_ERROR; } mp_msg(MSGT_AO,MSGL_DBG2,"left=%li, ", set_vol); @@ -219,6 +220,7 @@ static int control(int cmd, void *arg) if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, set_vol)) < 0) { mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Error setting right channel, %s\n", snd_strerror(err)); + snd_mixer_close(handle); return CONTROL_ERROR; } mp_msg(MSGT_AO,MSGL_DBG2,"right=%li, pmin=%li, pmax=%li, mult=%f\n", diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index ad17773fbd..130eee8f97 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -115,7 +115,8 @@ static int write_buffer(unsigned char* data, int len){ static int read_buffer(unsigned char* data,int len){ int buffered = av_fifo_size(ao->buffer); if (len > buffered) len = buffered; - return av_fifo_generic_read(ao->buffer, data, len, NULL); + av_fifo_generic_read(ao->buffer, data, len, NULL); + return len; } OSStatus theRenderProc(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData) diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c index b5c56d9f33..47a05ef2fa 100644 --- a/libao2/ao_sdl.c +++ b/libao2/ao_sdl.c @@ -82,10 +82,11 @@ static int read_buffer(unsigned char* data,int len){ int buffered = av_fifo_size(buffer); if (len > buffered) len = buffered; #ifdef USE_SDL_INTERNAL_MIXER - return av_fifo_generic_read(buffer, data, len, mix_audio); + av_fifo_generic_read(buffer, data, len, mix_audio); #else - return av_fifo_generic_read(buffer, data, len, NULL); + av_fifo_generic_read(buffer, data, len, NULL); #endif + return len; } // end ring buffer stuff |