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.

cmAudioPortAlsa.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 cmAudioPortAlsa_h
  4. #define cmAudioPortAlsa_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //{ { label: cmApAlsa kw:[ audio, device, rt ] }
  9. //
  10. //(
  11. // ALSA audio device API
  12. //
  13. // This API is used by the cmAudioPort interface when
  14. // the library is compiled for a Linux platform.
  15. //
  16. //)
  17. //[
  18. cmApRC_t cmApAlsaInitialize( cmRpt_t* rpt, unsigned baseApDevIdx );
  19. cmApRC_t cmApAlsaFinalize();
  20. cmApRC_t cmApAlsaDeviceCount();
  21. const char* cmApAlsaDeviceLabel( unsigned devIdx );
  22. unsigned cmApAlsaDeviceChannelCount( unsigned devIdx, bool inputFl );
  23. double cmApAlsaDeviceSampleRate( unsigned devIdx );
  24. unsigned cmApAlsaDeviceFramesPerCycle( unsigned devIdx, bool inputFl );
  25. cmApRC_t cmApAlsaDeviceSetup(
  26. unsigned devIdx,
  27. double srate,
  28. unsigned framesPerCycle,
  29. cmApCallbackPtr_t callbackPtr,
  30. void* userCbPtr );
  31. cmApRC_t cmApAlsaDeviceStart( unsigned devIdx );
  32. cmApRC_t cmApAlsaDeviceStop( unsigned devIdx );
  33. bool cmApAlsaDeviceIsStarted( unsigned devIdx );
  34. void cmApAlsaDeviceReport( cmRpt_t* rpt );
  35. //]
  36. //}
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif