Mercurial > audlegacy-plugins
changeset 1396:58ce3497879a
We do not need a playloop mutex any more
author | Ralf Ertzinger <ralf@skytale.net> |
---|---|
date | Fri, 03 Aug 2007 20:39:05 +0200 |
parents | 761e17b23e0c |
children | 6aaf2b06f056 263d72004333 |
files | src/flacng/plugin.c |
diffstat | 1 files changed, 0 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/src/flacng/plugin.c Fri Aug 03 07:21:36 2007 +0300 +++ b/src/flacng/plugin.c Fri Aug 03 20:39:05 2007 +0200 @@ -72,7 +72,6 @@ gboolean plugin_initialized = FALSE; gint seek_to = -1; static GThread* thread = NULL; -GMutex* flac_pl_mutex; /* === */ @@ -163,11 +162,6 @@ _LEAVE; } - /* - * Initialize the play loop mutex - */ - flac_pl_mutex = g_mutex_new(); - _DEBUG("plugin initialized OK!"); plugin_initialized = TRUE; _LEAVE; @@ -352,8 +346,6 @@ * The main play loop. * Decode a frame, push the decoded data to the output plugin * chunkwise. Repeat until finished. - * - * Must be entered with flac_pl_mutex held! */ gint32* read_pointer; @@ -370,7 +362,6 @@ if (NULL == (play_buffer = malloc(BUFFER_SIZE_BYTE))) { _ERROR("Could not allocate conversion buffer"); playback->playing = FALSE; - g_mutex_unlock(flac_pl_mutex); _LEAVE NULL; } @@ -383,7 +374,6 @@ main_info->stream.channels)) { playback->playing = FALSE; _ERROR("Could not open output plugin!"); - g_mutex_unlock(flac_pl_mutex); _LEAVE NULL; } @@ -536,11 +526,6 @@ _ERROR("Could not flush decoder state!"); } - /* - * Release the play loop mutex - */ - g_mutex_unlock(flac_pl_mutex); - _LEAVE NULL; } @@ -559,12 +544,6 @@ } /* - * This will end a currently running decoder thread - */ - input->playing = FALSE; - xmms_usleep(20000); - - /* * Open the file */ if (NULL == (fd = vfs_fopen(input->filename, "rb"))) { @@ -587,13 +566,6 @@ l = (main_info->stream.samples / main_info->stream.samplerate) * 1000; } - /* - * Grab the play loop mutex - */ - _DEBUG("Waiting for play loop mutex..."); - g_mutex_lock(flac_pl_mutex); - _DEBUG("Got play loop mutex"); - input->playing = TRUE; flac_ip.set_info(get_title(input->filename, main_info), l, -1, main_info->stream.samplerate, main_info->stream.channels);