# HG changeset patch # User John Lindgren # Date 1240194147 14400 # Node ID 03f247c0d31d21fc36587dc44fa4778b5e135bf5 # Parent eb7348ab56d26117581432cd10debc8912ef02f6 Fix stutter when resuming WMA audio playback. diff -r eb7348ab56d2 -r 03f247c0d31d src/wma/wma.c --- a/src/wma/wma.c Sat Apr 18 21:54:18 2009 +0100 +++ b/src/wma/wma.c Sun Apr 19 22:22:27 2009 -0400 @@ -103,7 +103,7 @@ return str; } -static void wma_about(void) +static void wma_about(void) { char *title; char *message; @@ -203,7 +203,7 @@ wma_pause = p; } -static void wma_seek(InputPlayback *playback, int time) +static void wma_seek(InputPlayback *playback, int time) { wma_seekpos = time; while(wma_decode && wma_seekpos!=-1) g_usleep(10000); @@ -381,8 +381,6 @@ while(!fifo_read(&f, wma_s_outbuf, wma_st_buff, &f.rptr) && wma_decode) { sst_buff = wma_st_buff; - if (wma_pause) - memset(wma_s_outbuf, 0, sst_buff); playback->pass_audio(playback, FMT_S16_NE, c->channels, sst_buff, (short *)wma_s_outbuf, NULL); memset(wma_s_outbuf, 0, sst_buff); @@ -404,11 +402,11 @@ if(ic) av_close_input_file(ic); } -static void wma_stop(InputPlayback *playback) +static void wma_stop(InputPlayback *playback) { wma_decode = 0; playback->playing = 0; if(wma_pause) wma_do_pause(playback, 0); g_thread_join(wma_decode_thread); playback->output->close_audio(); -} +}