blob: 7c7b139d196a738eea717996199b1b4274d4851c [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26#ifndef WIN32_EXTRA_LEAN
27#define WIN32_EXTRA_LEAN
28#endif
29#ifndef WIN32_LEAN_AND_MEAN
30#define WIN32_LEAN_AND_MEAN
31#endif
32
33#include <windows.h>
34#include <mmsystem.h>
35
36/* for waveformat extensible */
37#include <mmreg.h>
38#include <ks.h>
39
40#ifndef PLATFORM_API_WINOS_UTIL_INCLUDED
41#define PLATFORM_API_WINOS_UTIL_INCLUDED
42
43#define WIN_MAX_ERROR_LEN 200
44
45#if (USE_PLATFORM_MIDI_IN == TRUE) || (USE_PLATFORM_MIDI_OUT == TRUE)
46
47#include "PlatformMidi.h"
48
49typedef struct tag_SysExQueue {
50 int count; // number of sys ex headers
51 int size; // data size per sys ex header
52 int ownsLinearMem; // true when linearMem is to be disposed
53 UBYTE* linearMem; // where the actual sys ex data is, count*size bytes
54 MIDIHDR header[1]; // Windows specific structure to hold meta info
55} SysExQueue;
56
57/* set the startTime field in MidiDeviceHandle */
58void MIDI_SetStartTime(MidiDeviceHandle* handle);
59
60/* return time stamp in microseconds */
61INT64 MIDI_GetTimeStamp(MidiDeviceHandle* handle);
62
63// the buffers do not contain memory
64int MIDI_WinCreateEmptyLongBufferQueue(MidiDeviceHandle* handle, int count);
65int MIDI_WinCreateLongBufferQueue(MidiDeviceHandle* handle, int count, int size, UBYTE* preAllocatedMem);
66void MIDI_WinDestroyLongBufferQueue(MidiDeviceHandle* handle);
67
68#endif // USE_PLATFORM_MIDI_IN || USE_PLATFORM_MIDI_OUT
69
70#endif // PLATFORM_API_WINOS_UTIL_INCLUDED