libcm is a C development framework with an emphasis on audio signal processing applications.
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.

cmAudDsp.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //| Copyright: (C) 2009-2020 Kevin Larke <contact AT larke DOT org>
  2. //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. #ifndef cmAudDsp_h
  4. #define cmAudDsp_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc: "Supports a serialized interface to an internal instance of cmAudioSys and cmDspSys." kw:[rt]}
  9. enum
  10. {
  11. kOkAdRC = cmOkRC,
  12. kAudioPortFailAdRC,
  13. kAudioSysFailAdRC,
  14. kMidiSysFailAdRC,
  15. kSerialPortFailAdRC,
  16. kDspSysFailAdRC,
  17. kFileSysFailAdRC,
  18. kJsonFailAdRC,
  19. kSendMsgFailAdRC,
  20. kInvalidCfgIdxAdRC,
  21. kNoPgmLoadedAdRC,
  22. kInvalidSubSysIdxAdRC,
  23. kUnknownMsgTypeAdRC,
  24. kSerialDevCreateFailAdRC,
  25. kAggDevSysFailAdRC,
  26. kAggDevCreateFailAdRC,
  27. kNrtDevSysFailAdRC,
  28. kAfpDevSysFailAdRC,
  29. kNetSysFailAdRC,
  30. kInvalidAudioDevIdxAdRC
  31. };
  32. typedef cmRC_t cmAdRC_t;
  33. typedef cmHandle_t cmAdH_t;
  34. extern cmAdH_t cmAdNullHandle;
  35. // Create a audio dsp engine and send device and program information to the
  36. // host application.
  37. // cbPtr provides a function used by cmAudDsp to send messages to the client.
  38. cmAdRC_t cmAudDspAlloc( cmCtx_t* ctx, cmAdH_t* hp, cmMsgSendFuncPtr_t cbPtr, void* cbDataPtr );
  39. cmAdRC_t cmAudDspFree( cmAdH_t* hp );
  40. // Send the setup to the UI (device list,system cfg list, DSP programs)
  41. cmAdRC_t cmAudDspSendSetup( cmAdH_t h );
  42. bool cmAudDspIsValid( cmAdH_t h );
  43. // This function provides the primary interface for communication from the
  44. // client program to the aud_dsp system.
  45. cmAdRC_t cmAudDspReceiveClientMsg( cmAdH_t h, unsigned msgBytecnt, const void* msg );
  46. //)
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif