Browse Source

Add missing thread functionality to JackWinMMEOutputPort.

tags/1.9.8
Devin Anderson 14 years ago
parent
commit
8c7cabfe3d
2 changed files with 6 additions and 1 deletions
  1. +3
    -0
      windows/winmme/JackWinMMEOutputPort.cpp
  2. +3
    -1
      windows/winmme/JackWinMMEOutputPort.h

+ 3
- 0
windows/winmme/JackWinMMEOutputPort.cpp View File

@@ -52,6 +52,8 @@ JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name,
std::auto_ptr<JackMidiBufferReadQueue> read_queue_ptr(read_queue);
thread_queue = new JackMidiAsyncQueue(max_bytes, max_messages);
std::auto_ptr<JackMidiAsyncQueue> thread_queue_ptr(thread_queue);
thread = new JackThread(this);
std::auto_ptr<JackThread> thread_ptr(thread);
char error_message[MAXERRORLENGTH];
MMRESULT result = midiOutOpen(&handle, index, HandleMessageEvent, this,
CALLBACK_FUNCTION);
@@ -82,6 +84,7 @@ JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name,
snprintf(alias, sizeof(alias) - 1, "%s:%s:out%d", alias_name, driver_name,
index + 1);
snprintf(name, sizeof(name) - 1, "%s:playback_%d", client_name, index + 1);
thread_ptr.release();
write_queue_ptr.release();
thread_queue_ptr.release();
return;


+ 3
- 1
windows/winmme/JackWinMMEOutputPort.h View File

@@ -25,10 +25,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include "JackMidiAsyncQueue.h"
#include "JackMidiBufferReadQueue.h"
#include "JackThread.h"

namespace Jack {

class JackWinMMEOutputPort {
class JackWinMMEOutputPort: public JackRunnableInterface {

private:

@@ -60,6 +61,7 @@ namespace Jack {
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
JackMidiBufferReadQueue *read_queue;
HANDLE sysex_semaphore;
JackThread *thread;
JackMidiAsyncQueue *thread_queue;
HANDLE thread_queue_semaphore;



Loading…
Cancel
Save