mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
aos should respect the immed uninit flag (quit immediatly vs waiting till file
is played to end). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14850 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4c3d533c7d
commit
95cf851ea6
@ -687,6 +687,9 @@ static void uninit(int immed)
|
||||
if (alsa_handler) {
|
||||
int err;
|
||||
|
||||
if (!immed)
|
||||
snd_pcm_drain(alsa_handler);
|
||||
|
||||
if (!ao_noblock) {
|
||||
if ((err = snd_pcm_drop(alsa_handler)) < 0)
|
||||
{
|
||||
|
@ -482,6 +482,7 @@ static void uninit(int immed){
|
||||
mp_msg(MSGT_AO, MSGL_DBG3, "ao_nas: uninit()\n");
|
||||
|
||||
nas_data->expect_underrun = 1;
|
||||
if (!immed)
|
||||
while (nas_data->state != AuStateStop) usleep(1000);
|
||||
nas_data->stop_thread = 1;
|
||||
pthread_join(nas_data->event_thread, NULL);
|
||||
|
@ -293,8 +293,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
|
||||
static void uninit(int immed){
|
||||
mp_msg(MSGT_AO,MSGL_V,"SDL: Audio Subsystem shutting down!\n");
|
||||
if (!immed)
|
||||
while(buf_free() < BUFFSIZE - CHUNK_SIZE)
|
||||
usec_sleep(50000);
|
||||
usec_sleep(get_delay() * 1000 * 1000);
|
||||
SDL_CloseAudio();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ static void uninit(int immed) {
|
||||
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_Uninit);
|
||||
|
||||
if (ao_port) {
|
||||
if (!immed)
|
||||
while(alGetFilled(ao_port) > 0) sginap(1);
|
||||
alClosePort(ao_port);
|
||||
alFreeConfig(ao_config);
|
||||
|
Loading…
Reference in New Issue
Block a user