diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/audio_decoder.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 707160c58..7961b06f8 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.32 2001/09/01 14:33:00 guenter Exp $ + * $Id: audio_decoder.c,v 1.33 2001/09/06 13:37:46 jkeil Exp $ * * * functions that implement audio decoding @@ -31,6 +31,7 @@ #include <unistd.h> #include "xine_internal.h" +#include "utils.h" #include "monitor.h" void *audio_decoder_loop (void *this_gen) { @@ -41,8 +42,6 @@ void *audio_decoder_loop (void *this_gen) { int i,j; audio_decoder_t *decoder; - profiler_start_count (1); - while (running) { /* printf ("audio_loop: waiting for package...\n"); */ @@ -125,12 +124,14 @@ void *audio_decoder_loop (void *this_gen) { default: while (this->audio_mute==2) { - usleep (50000); + xine_usec_sleep (50000); } if (this->audio_mute) break; + profiler_start_count (1); + if ( (buf->type & 0xFF000000) == BUF_AUDIO_BASE ) { /* printf ("audio_decoder: got an audio buffer, type %08x\n", buf->type); */ @@ -193,12 +194,13 @@ void *audio_decoder_loop (void *this_gen) { } } else printf ("audio_decoder: unknown buffer type: %08x\n", buf->type); + + profiler_stop_count (1); } buf->free_buffer (buf); } - profiler_stop_count (1); pthread_exit(NULL); } |