Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
836 B

  1. /****************************************************************************
  2. *
  3. * callback.c
  4. *
  5. * Copyright (c) 1991 Microsoft Corporation. All Rights Reserved.
  6. *
  7. ***************************************************************************/
  8. #include <windows.h>
  9. #include <mmsystem.h>
  10. #include "sbtest.h"
  11. #pragma alloc_text(SBTESTCBFIX, SBMidiInCallback)
  12. // NOTE this function is entered at interrupt time
  13. // NOTE don't touch the DATA segment, it is not setup!!!!!!
  14. void FAR PASCAL SBMidiInCallback(HMIDIIN hMidiIn, UINT wMsg, DWORD dwInstance,
  15. DWORD dwParam1, DWORD dwParam2)
  16. {
  17. if (dwInstance) {
  18. if ((wMsg == MM_MIM_DATA) && ((dwParam1 & 0x000000F0) != 0x000000F0))
  19. // don't allow system messages (e.g. active sensing!)
  20. midiOutShortMsg((HMIDIOUT)dwInstance, dwParam1);
  21. }
  22. }