libcm is a C development framework with an emphasis on audio signal processing applications.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

cmMidiAlsa.c 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #include "cmPrefix.h"
  2. #include "cmGlobal.h"
  3. #include "cmRpt.h"
  4. #include "cmErr.h"
  5. #include "cmMem.h"
  6. #include "cmMallocDebug.h"
  7. #include "cmMidi.h"
  8. #include "cmMidiPort.h"
  9. typedef struct
  10. {
  11. bool inputFl;
  12. char* nameStr;
  13. //SInt32 uid;
  14. //MIDIEndpointRef epr;
  15. cmMpParserH_t parserH;
  16. double prevMicroSecs;
  17. } cmMpPort;
  18. typedef struct
  19. {
  20. char* nameStr;
  21. unsigned iPortCnt;
  22. cmMpPort* iPortArray;
  23. unsigned oPortCnt;
  24. cmMpPort* oPortArray;
  25. } cmMpDev;
  26. typedef struct
  27. {
  28. cmErr_t err;
  29. unsigned devCnt;
  30. cmMpDev* devArray;
  31. cmMpCallback_t cbFunc;
  32. void* cbDataPtr;
  33. } cmMpRoot;
  34. cmMpRoot _cmMpRoot = { {NULL,NULL,kOkMpRC}, 0, NULL, NULL, NULL };
  35. cmMpRC_t cmMpInitialize( cmMpCallback_t cbFunc, void* cbDataPtr, unsigned parserBufByteCnt, const char* appNameStr, cmRpt_t* rpt )
  36. {
  37. cmMpRC_t rc = kOkMpRC;
  38. if((rc = cmMpFinalize()) != kOkMpRC )
  39. return rc;
  40. cmErrSetup(&_cmMpRoot.err,rpt,"MIDI Port");
  41. _cmMpRoot.cbFunc = cbFunc;
  42. _cmMpRoot.cbDataPtr = cbDataPtr;
  43. return rc;
  44. }
  45. cmMpRC_t cmMpFinalize()
  46. {
  47. cmMpRC_t rc = kOkMpRC;
  48. return rc;
  49. }
  50. bool cmMpIsInitialized()
  51. { return false; }
  52. unsigned cmMpDeviceCount()
  53. {
  54. return 0;
  55. }
  56. const char* cmMpDeviceName( unsigned devIdx )
  57. { return NULL;
  58. }
  59. unsigned cmMpDevicePortCount( unsigned devIdx, unsigned flags )
  60. {
  61. return 0;
  62. }
  63. const char* cmMpDevicePortName( unsigned devIdx, unsigned flags, unsigned portIdx )
  64. {
  65. return NULL;
  66. }
  67. cmMpRC_t cmMpDeviceSend( unsigned devIdx, unsigned portIdx, cmMidiByte_t status, cmMidiByte_t d0, cmMidiByte_t d1 )
  68. {
  69. return kOkMpRC;
  70. }
  71. cmMpRC_t cmMpDeviceSendData( unsigned devIdx, unsigned portIdx, const cmMidiByte_t* dataPtr, unsigned byteCnt )
  72. {
  73. return kOkMpRC;
  74. }
  75. cmMpRC_t cmMpInstallCallback( unsigned devIdx, unsigned portIdx, cmMpCallback_t cbFunc, void* cbDataPtr )
  76. {
  77. cmMpRC_t rc = kOkMpRC;
  78. return rc;
  79. }
  80. cmMpRC_t cmMpRemoveCallback( unsigned devIdx, unsigned portIdx, cmMpCallback_t cbFunc, void* cbDataPtr )
  81. {
  82. cmMpRC_t rc = kOkMpRC;
  83. return rc;
  84. }
  85. bool cmMpUsesCallback( unsigned devIdx, unsigned portIdx, cmMpCallback_t cbFunc, void* cbDataPtr )
  86. {
  87. return false;
  88. }
  89. void cmMpReport( cmRpt_t* rpt )
  90. {
  91. }