2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
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.

portmidi.mock.h 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef PORTMIDI_MOCK_H
  2. #define PORTMIDI_MOCK_H
  3. #include <portmidi.h>
  4. #include "../../../src/packages/common/IZ_common.h"
  5. static PmDeviceInfo MOCK_DEVICE_INFO = {
  6. .output = 1,
  7. .input = 1,
  8. .name = "Mock MIDI Device",
  9. .interf = "MMSystem",
  10. .is_virtual = 0,
  11. .opened = 0,
  12. .structVersion = 1,
  13. };
  14. mock(Pm_Initialize) i32 Pm_Initialize(void) {
  15. mock_return(Pm_Initialize) 0;
  16. }
  17. mock(Pm_GetDeviceInfo) const PmDeviceInfo* Pm_GetDeviceInfo(PmDeviceID id) {
  18. mock_return(Pm_GetDeviceInfo) &MOCK_DEVICE_INFO;
  19. }
  20. mock(Pm_OpenInput) i32 Pm_OpenInput(
  21. PortMidiStream** stream,
  22. PmDeviceID inputDevice,
  23. void* inputDriverInfo,
  24. i32 bufferSize,
  25. PmTimeProcPtr time_proc,
  26. void* time_info
  27. ) {
  28. mock_return(Pm_OpenInput) 0;
  29. }
  30. mock(Pm_Close) i32 Pm_Close(PortMidiStream* stream) {
  31. mock_return(Pm_Close) 0;
  32. }
  33. #define MOCK_OPEN_MIDI_DEVICES 1
  34. mock(Pm_CountDevices) i32 Pm_CountDevices(void) {
  35. mock_return(Pm_CountDevices) MOCK_OPEN_MIDI_DEVICES;
  36. }
  37. #endif