mirror of
https://github.com/thestk/stk
synced 2026-01-18 07:01:53 +00:00
Version 4.4.0
This commit is contained in:
committed by
Stephen Sinclair
parent
d199342e86
commit
eccd8c9981
@@ -28,14 +28,24 @@
|
||||
This class is primarily for use in STK example programs but it is
|
||||
generic enough to work in many other contexts.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#include "Messager.h"
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include "SKINI.msg"
|
||||
|
||||
namespace stk {
|
||||
|
||||
#if defined(__STK_REALTIME__)
|
||||
|
||||
extern "C" THREAD_RETURN THREAD_TYPE stdinHandler(void * ptr);
|
||||
extern "C" THREAD_RETURN THREAD_TYPE socketHandler(void * ptr);
|
||||
|
||||
#endif // __STK_REALTIME__
|
||||
|
||||
static const int STK_FILE = 0x1;
|
||||
static const int STK_MIDI = 0x2;
|
||||
static const int STK_STDIN = 0x4;
|
||||
@@ -152,6 +162,8 @@ bool Messager :: startStdInput()
|
||||
return true;
|
||||
}
|
||||
|
||||
//} // stk namespace
|
||||
|
||||
THREAD_RETURN THREAD_TYPE stdinHandler(void *ptr)
|
||||
{
|
||||
Messager::MessagerData *data = (Messager::MessagerData *) ptr;
|
||||
@@ -208,6 +220,8 @@ void midiHandler( double timeStamp, std::vector<unsigned char> *bytes, void *ptr
|
||||
data->mutex.unlock();
|
||||
}
|
||||
|
||||
//namespace stk {
|
||||
|
||||
bool Messager :: startMidiInput( int port )
|
||||
{
|
||||
if ( data_.sources == STK_FILE ) {
|
||||
@@ -290,6 +304,8 @@ bool Messager :: startSocketInput( int port )
|
||||
return true;
|
||||
}
|
||||
|
||||
//} // stk namespace
|
||||
|
||||
#if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__))
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
@@ -412,4 +428,7 @@ THREAD_RETURN THREAD_TYPE socketHandler(void *ptr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
} // stk namespace
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user