Path: blob/master/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.h
41152 views
/*1* Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef WIN32_EXTRA_LEAN26#define WIN32_EXTRA_LEAN27#endif28#ifndef WIN32_LEAN_AND_MEAN29#define WIN32_LEAN_AND_MEAN30#endif3132#include <windows.h>33#include <mmsystem.h>3435/* for waveformat extensible */36#include <mmreg.h>37#include <ks.h>3839#ifndef PLATFORM_API_WINOS_UTIL_INCLUDED40#define PLATFORM_API_WINOS_UTIL_INCLUDED4142#define WIN_MAX_ERROR_LEN 2004344#if (USE_PLATFORM_MIDI_IN == TRUE) || (USE_PLATFORM_MIDI_OUT == TRUE)4546#include "PlatformMidi.h"4748typedef struct tag_SysExQueue {49int count; // number of sys ex headers50int size; // data size per sys ex header51int ownsLinearMem; // true when linearMem is to be disposed52UBYTE* linearMem; // where the actual sys ex data is, count*size bytes53MIDIHDR header[1]; // Windows specific structure to hold meta info54} SysExQueue;5556/* set the startTime field in MidiDeviceHandle */57void MIDI_SetStartTime(MidiDeviceHandle* handle);5859/* return time stamp in microseconds */60INT64 MIDI_GetTimeStamp(MidiDeviceHandle* handle);6162// the buffers do not contain memory63int MIDI_WinCreateEmptyLongBufferQueue(MidiDeviceHandle* handle, int count);64int MIDI_WinCreateLongBufferQueue(MidiDeviceHandle* handle, int count, int size, UBYTE* preAllocatedMem);65void MIDI_WinDestroyLongBufferQueue(MidiDeviceHandle* handle);6667#endif // USE_PLATFORM_MIDI_IN || USE_PLATFORM_MIDI_OUT6869#endif // PLATFORM_API_WINOS_UTIL_INCLUDED707172