diff -Nur audacious-plugins-fedora-2.1-orig/src/musepack/libmpc.cxx audacious-plugins-fedora-2.1-musepack/src/musepack/libmpc.cxx
--- audacious-plugins-fedora-2.1-orig/src/musepack/libmpc.cxx 2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-musepack/src/musepack/libmpc.cxx 2009-11-13 19:08:48.066816546 +0100
@@ -48,7 +48,6 @@
static MpcDecoder mpcDecoder = {0};
static TrackInfo track = {0};
-static GThread *threadHandle;
static GStaticMutex threadMutex = G_STATIC_MUTEX_INIT;
/*
@@ -301,24 +300,21 @@
mpcDecoder.isAlive = true;
mpcDecoder.isOutput = false;
mpcDecoder.isPause = false;
- threadHandle = g_thread_self();
+ data->playing = TRUE;
data->set_pb_ready(data);
decodeStream(data);
+ data->playing = FALSE;
}
static void mpcStop(InputPlayback *data)
{
setAlive(false);
- if (threadHandle)
- {
- g_thread_join(threadHandle);
if (mpcDecoder.isOutput)
{
data->output->buffer_free();
data->output->close_audio();
mpcDecoder.isOutput = false;
}
- }
}
static void mpcPause(InputPlayback *data, short p_Pause)
@@ -833,8 +829,7 @@
lockAcquire();
short iPlaying = data->output->buffer_playing()? 1 : 0;
- gint iFree = data->output->buffer_free();
- if (!mpcDecoder.isPause && iFree >= ((1152 * 4) << iPlaying))
+ if (!mpcDecoder.isPause)
{
unsigned status = processBuffer(data, sampleBuffer, xmmsBuffer, decoder);
if (status == (unsigned) (-1))
@@ -860,7 +855,6 @@
else
{
lockRelease();
- g_usleep(10000);
}
}
return endThread(filename, input, false);
@@ -911,12 +905,12 @@
inline static void lockAcquire()
{
- g_static_mutex_lock(&threadMutex);
+ /* g_static_mutex_lock(&threadMutex); */
}
inline static void lockRelease()
{
- g_static_mutex_unlock(&threadMutex);
+ /* g_static_mutex_unlock(&threadMutex); */
}
inline static bool isAlive()