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.

cmAudLabelFile.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 cmAudLabelFile_h
  4. #define cmAudLabelFile_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc:"Read and write Audacity label files." kw:[audio file] }
  9. enum
  10. {
  11. kOkAlfRC = cmOkRC,
  12. kLHeapFailAlfRC,
  13. kFileFailAlfRC,
  14. kSyntaxErrAlfRC,
  15. kAlfFileFailPuRC
  16. };
  17. typedef cmRC_t cmAlfRC_t;
  18. typedef cmHandle_t cmAlfH_t;
  19. extern cmAlfH_t cmAlfNullHandle;
  20. typedef struct
  21. {
  22. cmReal_t begSecs;
  23. cmReal_t endSecs;
  24. const cmChar_t* label;
  25. } cmAlfLabel_t;
  26. cmAlfRC_t cmAudLabelFileAlloc( cmCtx_t* ctx, cmAlfH_t* hp );
  27. cmAlfRC_t cmAudLabelFileAllocOpen( cmCtx_t* ctx, cmAlfH_t* hp, const cmChar_t* fn );
  28. cmAlfRC_t cmAudLabelFileFree( cmAlfH_t* hp );
  29. bool cmAudLabelFileIsValid( cmAlfH_t h );
  30. cmAlfRC_t cmAudLabelFileOpen( cmAlfH_t h, const cmChar_t* fn );
  31. cmAlfRC_t cmAudLabelFileInsert( cmAlfH_t h, cmReal_t begSecs, cmReal_t endSecs, const cmChar_t* label );
  32. unsigned cmAudLabelFileCount( cmAlfH_t h );
  33. const cmAlfLabel_t* cmAudLabelFileLabel( cmAlfH_t h, unsigned idx );
  34. cmAlfRC_t cmAudLabelFileWrite( cmAlfH_t h, const cmChar_t* fn );
  35. void cmAudLabelFileTest( cmCtx_t* ctx );
  36. //)
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif