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.

cmSyncRecd.h 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 cmSyncRecd_h
  4. #define cmSyncRecd_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc:"Generate time-alignment data between an audio and MIDI file. See cmDspSyncRecd_t." kw[proc] }
  9. enum
  10. {
  11. kOkSyRC,
  12. kFileFailSyRC,
  13. kAudioFileFailSyRC,
  14. kInvalidOpSyRC
  15. };
  16. typedef cmHandle_t cmSyncRecdH_t;
  17. typedef cmRC_t cmSyRC_t;
  18. extern cmSyncRecdH_t cmSyncRecdNullHandle;
  19. cmSyRC_t cmSyncRecdCreate( cmCtx_t* ctx, cmSyncRecdH_t* hp, const cmChar_t* srFn, const cmChar_t* audioFn, double srate, unsigned chCnt, unsigned bits );
  20. cmSyRC_t cmSyncRecdOpen( cmCtx_t* ctx, cmSyncRecdH_t* hp, const cmChar_t* srFn );
  21. cmSyRC_t cmSyncRecdFinal( cmSyncRecdH_t* hp );
  22. bool cmSyncRecdIsValid( cmSyncRecdH_t h );
  23. cmSyRC_t cmSyncRecdMidiWrite( cmSyncRecdH_t h, const cmTimeSpec_t* timestamp, unsigned status, unsigned d0, unsigned d1 );
  24. cmSyRC_t cmSyncRecdAudioWrite( cmSyncRecdH_t h, const cmTimeSpec_t* timestamp, unsigned smpIdx, const cmSample_t* ch[], unsigned chCnt, unsigned frmCnt );
  25. cmSyRC_t cmSyncRecdTest( cmCtx_t* ctx );
  26. //)
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif