libcm is a C development framework with an emphasis on audio signal processing applications.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

cmAudioNrtDev.h 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef cmAudioNrtDev_h
  2. #define cmAudioNrtDev_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. cmApRC_t cmApNrtAllocate( cmRpt_t* rpt );
  7. cmApRC_t cmApNrtFree();
  8. cmApRC_t cmApNrtCreateDevice(
  9. const cmChar_t* label,
  10. double srate,
  11. unsigned iChCnt,
  12. unsigned oChCnt,
  13. unsigned cbPeriodMs );
  14. /// Setup the audio port management object for this machine.
  15. cmApRC_t cmApNrtInitialize( cmRpt_t* rpt, unsigned baseApDevIdx );
  16. /// Stop all audio devices and release any resources held
  17. /// by the audio port management object.
  18. cmApRC_t cmApNrtFinalize();
  19. /// Return the count of audio devices attached to this machine.
  20. unsigned cmApNrtDeviceCount();
  21. /// Get a textual description of the device at index 'devIdx'.
  22. const char* cmApNrtDeviceLabel( unsigned devIdx );
  23. /// Get the count of audio input or output channesl on device at index 'devIdx'.
  24. unsigned cmApNrtDeviceChannelCount( unsigned devIdx, bool inputFl );
  25. /// Get the current sample rate of a device. Note that if the device has both
  26. /// input and output capability then the sample rate is the same for both.
  27. double cmApNrtDeviceSampleRate( unsigned devIdx );
  28. /// Get the count of samples per callback for the input or output for this device.
  29. unsigned cmApNrtDeviceFramesPerCycle( unsigned devIdx, bool inputFl );
  30. /// Configure a device.
  31. cmApRC_t cmApNrtDeviceSetup(
  32. unsigned devIdx,
  33. double srate,
  34. unsigned framesPerCycle,
  35. cmApCallbackPtr_t callbackPtr,
  36. void* userCbPtr );
  37. /// Start a device. Note that the callback may be made prior to this function returning.
  38. cmApRC_t cmApNrtDeviceStart( unsigned devIdx );
  39. /// Stop a device.
  40. cmApRC_t cmApNrtDeviceStop( unsigned devIdx );
  41. /// Return true if the device is currently started.
  42. bool cmApNrtDeviceIsStarted( unsigned devIdx );
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif