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.1KB

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