/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "PlatformMidi.h" // JavaSound header for platform midi support.
#include <CoreAudio/CoreAudio.h> // This provides access to the host's time base and translations to nanoseconds.
/* for memcpy */
#include <string.h>
/* for malloc */
#include <stdlib.h>
/* for usleep */
#include <unistd.h>
#ifdef USE_ERROR
#include <stdio.h>
#endif
#ifdef USE_ERROR
#else
#define MIDI_CHECK_ERROR
#endif
typedef struct {
MidiDeviceHandle h; /* the real handle (must be the first field!) */
CFMutableDataRef readingSysExData; /* Non-Null: in the middle of reading SysEx data; Null: otherwise */
extern const char* MIDI_Utils_GetErrorMsg(int err);
extern void MIDI_Utils_PrintError(int err);
// A MIDI endpoint represents a source or a destination for a standard 16-channel MIDI data stream.
enum {
};
// The parameter "direction" is either MIDI_IN or MIDI_OUT.
// Declarations of functions required by the JavaSound MIDI Porting layer.
extern INT32 MIDI_Utils_GetDeviceName(int direction, INT32 deviceID, char *name, UINT32 nameLength);
extern INT32 MIDI_Utils_GetDeviceVendor(int direction, INT32 deviceID, char *name, UINT32 nameLength);
extern INT32 MIDI_Utils_GetDeviceDescription(int direction, INT32 deviceID, char *name, UINT32 nameLength);
extern INT32 MIDI_Utils_GetDeviceVersion(int direction, INT32 deviceID, char *name, UINT32 nameLength);
int num_msgs, int num_long_msgs,
// Mac OS X port for locking and synchronization.
extern void* MIDI_CreateConditionVariable();
extern void MIDI_DestroyConditionVariable(void* cond);
extern void MIDI_SignalConditionVariable(void* cond);
#endif // USE_PLATFORM_MIDI_IN || USE_PLATFORM_MIDI_OUT