0N/A/*
2362N/A * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A#ifndef WIN32_EXTRA_LEAN
0N/A#define WIN32_EXTRA_LEAN
0N/A#endif
0N/A#ifndef WIN32_LEAN_AND_MEAN
0N/A#define WIN32_LEAN_AND_MEAN
0N/A#endif
0N/A
0N/A#include <windows.h>
0N/A#include <mmsystem.h>
0N/A
0N/A/* for waveformat extensible */
0N/A#include <mmreg.h>
0N/A#include <ks.h>
0N/A
0N/A#ifndef PLATFORM_API_WINOS_UTIL_INCLUDED
0N/A#define PLATFORM_API_WINOS_UTIL_INCLUDED
0N/A
0N/A#define WIN_MAX_ERROR_LEN 200
0N/A
0N/A#if (USE_PLATFORM_MIDI_IN == TRUE) || (USE_PLATFORM_MIDI_OUT == TRUE)
0N/A
0N/A#include "PlatformMidi.h"
0N/A
0N/Atypedef struct tag_SysExQueue {
0N/A int count; // number of sys ex headers
0N/A int size; // data size per sys ex header
0N/A int ownsLinearMem; // true when linearMem is to be disposed
0N/A UBYTE* linearMem; // where the actual sys ex data is, count*size bytes
0N/A MIDIHDR header[1]; // Windows specific structure to hold meta info
0N/A} SysExQueue;
0N/A
0N/A/* set the startTime field in MidiDeviceHandle */
0N/Avoid MIDI_SetStartTime(MidiDeviceHandle* handle);
0N/A
0N/A/* return time stamp in microseconds */
0N/AINT64 MIDI_GetTimeStamp(MidiDeviceHandle* handle);
0N/A
0N/A// the buffers do not contain memory
0N/Aint MIDI_WinCreateEmptyLongBufferQueue(MidiDeviceHandle* handle, int count);
0N/Aint MIDI_WinCreateLongBufferQueue(MidiDeviceHandle* handle, int count, int size, UBYTE* preAllocatedMem);
0N/Avoid MIDI_WinDestroyLongBufferQueue(MidiDeviceHandle* handle);
0N/A
0N/A#endif // USE_PLATFORM_MIDI_IN || USE_PLATFORM_MIDI_OUT
0N/A
0N/A#endif // PLATFORM_API_WINOS_UTIL_INCLUDED