19 #if !defined(TT_PLATFORM_MAC)
20 MIDISource::MIDISource(MIDIPtr protocol,
TTSymbol& application,
TTPtr client) :
23 mApplication(application)
28 MIDISource::MIDISource(MIDIPtr protocol,
TTSymbol& application, MIDIClientRef client) :
31 mApplication(application)
37 MIDISource::~MIDISource()
39 #if !defined(TT_PLATFORM_MAC)
42 MIDIEndpointDispose(mSource);
48 if (newName != mName) {
55 #if !defined(TT_PLATFORM_MAC)
58 MIDIEndpointDispose(mSource);
61 CFStringEncoding defaultEncoding = CFStringGetSystemEncoding();
64 CFStringRef s_name = CFStringCreateWithCString(kCFAllocatorDefault, mName.c_str(), defaultEncoding);
65 OSStatus status = MIDISourceCreate(mClient, s_name, &mSource);
66 if (status != noErr) {
67 TTLogError(
"Could not create source : %d\n", (
int)status);
78 if (running != mRunning) {
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
create an virtual MIDI source
The TTAddress class is used to represent a string and efficiently pass and compare that string...
void * TTPtr
A generic pointer.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
void TTFOUNDATION_EXPORT TTLogError(TTImmutableCString message,...)
Platform and host independent method for posting errors.
Something went wrong, but what exactly is not known. Typically used for context-specific problems...
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
[doxygenAppendixC_copyExample]