From 43bfdf725f0c3af2abd092326598c122902738b3 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 4 Nov 2007 16:33:12 +0000 Subject: faster seek speed when use alsa plugin as output git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@177 90c681e8-e032-0410-971d-27865f9a5e38 --- lib/qmmp/Output/alsa/outputalsa.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/qmmp/Output/alsa/outputalsa.cpp b/lib/qmmp/Output/alsa/outputalsa.cpp index 5ee44c314..883076a83 100644 --- a/lib/qmmp/Output/alsa/outputalsa.cpp +++ b/lib/qmmp/Output/alsa/outputalsa.cpp @@ -261,6 +261,7 @@ void OutputALSA::run() done = m_userStop; + //qDebug("x1"); while (! done && (recycler()->empty() || m_pause)) { mutex()->unlock(); @@ -269,8 +270,8 @@ void OutputALSA::run() mutex()->lock (); done = m_userStop; status(); - } + //qDebug("x2"); if (! b) { @@ -301,8 +302,9 @@ void OutputALSA::run() } else if (m == -EAGAIN) { - //usleep(500); + mutex()->unlock(); snd_pcm_wait(pcm_handle, 500); + mutex()->lock(); } else if (m == -EPIPE) { @@ -463,7 +465,7 @@ void OutputALSA::parseMixerName(char *str, char **name, int *index) snd_mixer_elem_t* OutputALSA::getMixerElem(snd_mixer_t *mixer, char *name, int index) { - snd_mixer_selem_id_t *selem_id; + snd_mixer_selem_id_t* selem_id; snd_mixer_elem_t* elem; snd_mixer_selem_id_alloca(&selem_id); -- cgit v1.2.3-13-gbd6f