[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/kmid
From:       Pedro Lopez-Cabanillas <pedro.lopez.cabanillas () gmail ! com>
Date:       2010-07-12 11:31:43
Message-ID: 20100712113143.6C6DEAC867 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1148998 by pedrol:

Synced Drumstick 0.4.1 fixes

 M  +10 -0     ChangeLog  
 M  +0 -3      alsa/alsabackend.cpp  
 M  +1 -2      drumstick/include/alsaclient.h  
 M  +5 -17     drumstick/src/alsaclient.cpp  
 M  +5 -6      drumstick/src/alsatimer.cpp  
 M  +7 -8      drumstick/src/playthread.cpp  


--- trunk/extragear/multimedia/kmid/ChangeLog #1148997:1148998
@@ -1,3 +1,13 @@
+2010-07-12 Pedro Lopez-Cabanillas
+    * Assigned shortcuts to keyboard media keys
+    * Synced Drumstick 0.4.1 fixes
+    * Drumstick 0.4.1 also fixes this bug: Launching fluidsynth 1.1.x at 
+      program's startup fails in systems affected by this glib-2.22 bug:
+      https://bugzilla.gnome.org/show_bug.cgi?id=599079
+
+2010-06-27
+    * Fix in ALSA sequencer backend: bug 242912 (requires Drumstick >= 0.4)    
+
 2010-06-12 Pedro Lopez-Cabanillas
     * Fixes in ALSA sequencer backend: two crashes, bugs 240391 and 240394. 
     * release 2.3.1
--- trunk/extragear/multimedia/kmid/alsa/alsabackend.cpp #1148997:1148998
@@ -69,14 +69,11 @@
     ALSABackend::ALSABackend(QObject* parent, const QVariantList& args)
         : Backend(parent, args), d(new BackendPrivate)
     {
-        //struct sched_param p;
         try {
             d->m_object = new ALSAMIDIObject(this);
             d->m_output = new ALSAMIDIOutput(this);
             d->m_object->initialize(d->m_output);
             d->m_initialized = true;
-            //::memset(&p, 0, sizeof(p));
-            //::sched_setscheduler(QCoreApplication::applicationPid(), SCHED_OTHER, &p);
         } catch (const SequencerError& ex) {
             QString errorstr = i18nc("@info","Fatal error from the ALSA sequencer backend. "
                 "This usually happens when the kernel does not have ALSA support, "
--- trunk/extragear/multimedia/kmid/drumstick/include/alsaclient.h #1148997:1148998
@@ -215,8 +215,7 @@
         virtual void run();
         bool stopped();
         void stop();
-        void start( Priority priority = InheritPriority );
-    private:
+
         MidiClient *m_MidiClient;
         int m_Wait;
         bool m_Stopped;
--- trunk/extragear/multimedia/kmid/drumstick/src/alsaclient.cpp #1148997:1148998
@@ -23,6 +23,8 @@
 #include <QFile>
 #include <QRegExp>
 #include <QThread>
+#include <QReadLocker>
+#include <QWriteLocker>
 #include <pthread.h>
 
 /**
@@ -1676,10 +1678,8 @@
 bool
 MidiClient::SequencerInputThread::stopped()
 {
-    m_mutex.lockForRead();
-    bool bTmp = m_Stopped;
-    m_mutex.unlock();
-    return  bTmp;
+	QReadLocker locker(&m_mutex);
+    return m_Stopped;
 }
 
 /**
@@ -1688,23 +1688,11 @@
 void
 MidiClient::SequencerInputThread::stop()
 {
-    m_mutex.lockForWrite();
+	QWriteLocker locker(&m_mutex);
     m_Stopped = true;
-    m_mutex.unlock();
 }
 
 /**
- * Starts the input thread.
- * @param priority the thread priority, default is InheritPriority
- * @since 0.2.0
- */
-void
-MidiClient::SequencerInputThread::start( Priority priority )
-{
-    QThread::start(priority);
-}
-
-/**
  * Main input thread process loop.
  */
 void
--- trunk/extragear/multimedia/kmid/drumstick/src/alsatimer.cpp #1148997:1148998
@@ -18,6 +18,8 @@
 */
 
 #include "alsatimer.h"
+#include <QReadLocker>
+#include <QWriteLocker>
 #include <cmath>
 #include <cstdio>
 
@@ -1433,10 +1435,8 @@
 bool
 Timer::TimerInputThread::stopped()
 {
-    m_mutex.lockForRead();
-    bool bTmp = m_Stopped;
-    m_mutex.unlock();
-    return  bTmp;
+	QReadLocker locker(&m_mutex);
+    return m_Stopped;
 }
 
 /**
@@ -1445,9 +1445,8 @@
 void
 Timer::TimerInputThread::stop()
 {
-    m_mutex.lockForWrite();
+	QWriteLocker locker(&m_mutex);
     m_Stopped = true;
-    m_mutex.unlock();
 }
 
 } /* namespace drumstick */
--- trunk/extragear/multimedia/kmid/drumstick/src/playthread.cpp #1148997:1148998
@@ -20,6 +20,8 @@
 #include "playthread.h"
 #include "alsaclient.h"
 #include "alsaqueue.h"
+#include <QReadLocker>
+#include <QWriteLocker>
 
 /**
  * @file playthread.cpp
@@ -82,10 +84,8 @@
 bool
 SequencerOutputThread::stopRequested()
 {
-    m_mutex.lockForRead();
-    bool bTmp = m_Stopped;
-    m_mutex.unlock();
-    return  bTmp;
+	QReadLocker locker(&m_mutex);
+    return m_Stopped;
 }
 
 /**
@@ -94,9 +94,9 @@
 void
 SequencerOutputThread::stop()
 {
-    m_mutex.lockForWrite();
+	QWriteLocker locker(&m_mutex);
     m_Stopped = true;
-    m_mutex.unlock();
+    locker.unlock();
     while (isRunning())
         wait(TIMEOUT);
 }
@@ -214,10 +214,9 @@
  */
 void SequencerOutputThread::start( Priority priority )
 {
-    m_mutex.lockForWrite();
+	QWriteLocker locker(&m_mutex);
     m_Stopped = false;
     QThread::start( priority );
-    m_mutex.unlock();
 }
 
 } /* namespace drumstick */
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic