< prev index next >

src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp

Print this page
rev 52923 : 8226346: Build better binary builders
Reviewed-by: andrew


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #define USE_ERROR
  27 #define USE_TRACE
  28 
  29 /* include Java Sound specific headers as C code */
  30 extern "C" {
  31 #include "PLATFORM_API_WinOS_Util.h"
  32 }
  33 
  34 /* include to prevent charset problem */
  35 #include "PLATFORM_API_WinOS_Charset_Util.h"
  36 
  37 #if USE_PLATFORM_MIDI_IN == TRUE
  38 
  39 #ifdef USE_ERROR
  40 #include <stdio.h>
  41 
  42 /* Use THIS_FILE when it is available. */
  43 #ifndef THIS_FILE
  44     #define THIS_FILE __FILE__
  45 #endif
  46 
  47 #define MIDIIN_CHECK_ERROR { \
  48         if (err != MMSYSERR_NOERROR) \
  49             ERROR3("MIDI IN Error in %s:%d : %s\n", THIS_FILE, __LINE__, MIDI_IN_GetErrorStr((INT32) err)); \
  50     }
  51 #else
  52 #define MIDIIN_CHECK_ERROR
  53 #endif
  54 
  55 /*
  56  * Callback from the MIDI device for all messages.
  57  */
  58 //$$fb dwParam1 holds a pointer for long messages. How can that be a DWORD then ???
  59 void CALLBACK MIDI_IN_PutMessage( HMIDIIN hMidiIn, UINT wMsg, UINT_PTR dwInstance, UINT_PTR dwParam1, UINT_PTR dwParam2 ) {
  60 
  61     MidiDeviceHandle* handle = (MidiDeviceHandle*) dwInstance;
  62 
  63     TRACE3("> MIDI_IN_PutMessage, hMidiIn: %x, wMsg: %x, dwInstance: %x\n", hMidiIn, wMsg, dwInstance);
  64     TRACE2("                      dwParam1: %x, dwParam2: %x\n", dwParam1, dwParam2);
  65 
  66     switch(wMsg) {
  67 
  68     case MIM_OPEN:
  69         TRACE0("< MIDI_IN_PutMessage: MIM_OPEN\n");




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #define USE_ERROR
  27 #define USE_TRACE
  28 
  29 /* include Java Sound specific headers as C code */
  30 extern "C" {
  31 #include "PLATFORM_API_WinOS_Util.h"
  32 }
  33 
  34 /* include to prevent charset problem */
  35 #include "PLATFORM_API_WinOS_Charset_Util.h"
  36 
  37 #if USE_PLATFORM_MIDI_IN == TRUE
  38 
  39 #ifdef USE_ERROR
  40 #include <stdio.h>
  41 





  42 #define MIDIIN_CHECK_ERROR { \
  43         if (err != MMSYSERR_NOERROR) \
  44             ERROR3("MIDI IN Error in %s:%d : %s\n", __FILE__, __LINE__, MIDI_IN_GetErrorStr((INT32) err)); \
  45     }
  46 #else
  47 #define MIDIIN_CHECK_ERROR
  48 #endif
  49 
  50 /*
  51  * Callback from the MIDI device for all messages.
  52  */
  53 //$$fb dwParam1 holds a pointer for long messages. How can that be a DWORD then ???
  54 void CALLBACK MIDI_IN_PutMessage( HMIDIIN hMidiIn, UINT wMsg, UINT_PTR dwInstance, UINT_PTR dwParam1, UINT_PTR dwParam2 ) {
  55 
  56     MidiDeviceHandle* handle = (MidiDeviceHandle*) dwInstance;
  57 
  58     TRACE3("> MIDI_IN_PutMessage, hMidiIn: %x, wMsg: %x, dwInstance: %x\n", hMidiIn, wMsg, dwInstance);
  59     TRACE2("                      dwParam1: %x, dwParam2: %x\n", dwParam1, dwParam2);
  60 
  61     switch(wMsg) {
  62 
  63     case MIM_OPEN:
  64         TRACE0("< MIDI_IN_PutMessage: MIM_OPEN\n");


< prev index next >