libcm is a C development framework with an emphasis on audio signal processing applications.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

cmDspPgmKr.c 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #include "cmPrefix.h"
  2. #include "cmGlobal.h"
  3. #include "cmFloatTypes.h"
  4. #include "cmRpt.h"
  5. #include "cmErr.h"
  6. #include "cmCtx.h"
  7. #include "cmMem.h"
  8. #include "cmMallocDebug.h"
  9. #include "cmLinkedHeap.h"
  10. #include "cmText.h"
  11. #include "cmFileSys.h"
  12. #include "cmSymTbl.h"
  13. #include "cmJson.h"
  14. #include "cmPrefs.h"
  15. #include "cmDspValue.h"
  16. #include "cmMsgProtocol.h"
  17. #include "cmThread.h"
  18. #include "cmUdpPort.h"
  19. #include "cmUdpNet.h"
  20. #include "cmAudioSys.h"
  21. #include "cmProcObj.h"
  22. #include "cmDspCtx.h"
  23. #include "cmDspClass.h"
  24. #include "cmDspSys.h"
  25. #include "cmDspPgm.h"
  26. #include "cmAudioFile.h"
  27. #include "cmProcObj.h"
  28. #include "cmProc.h"
  29. #include "cmProc3.h"
  30. #include "cmVectOpsTemplateMain.h"
  31. #include "cmVectOps.h"
  32. cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
  33. {
  34. cmDspRC_t rc = kOkDspRC;
  35. const cmChar_t* tlFn = "/home/kevin/src/cmgv/src/gv/data/tl7.js";
  36. const cmChar_t* audPath = "/home/kevin/media/audio/20110723-Kriesberg/Audio Files";
  37. cmDspInst_t* tlp = cmDspSysAllocInst(h,"TimeLine", "tl", 2, tlFn, audPath );
  38. cmDspInst_t* php = cmDspSysAllocInst(h,"Phasor", NULL, 0 );
  39. cmDspInst_t* wtp = cmDspSysAllocInst(h,"WaveTable",NULL, 2, cmDspSysSampleRate(h), 0 );
  40. cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",NULL, 1, 0 );
  41. cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",NULL, 1, 1 );
  42. cmDspInst_t* prp = cmDspSysAllocInst(h,"Printer", NULL, 1, ">" );
  43. if((rc = cmDspSysLastRC(h)) != kOkDspRC )
  44. return rc;
  45. cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt
  46. cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" ); // wt -> aout0
  47. cmDspSysConnectAudio(h, wtp, "out", ao1p, "in" ); // wt -> aout1
  48. cmDspSysInstallCb(h, tlp, "afn", prp, "in", NULL );
  49. cmDspSysInstallCb(h, tlp, "afn", wtp, "fn", NULL );
  50. cmDspSysInstallCb(h, tlp, "bsi", wtp, "beg", NULL );
  51. cmDspSysInstallCb(h, tlp, "esi", wtp, "end", NULL );
  52. cmDspSysInstallCb(h, tlp, "mfn", prp, "in", NULL );
  53. cmDspSysInstallCb(h, tlp, "sel", prp, "in", NULL );
  54. return rc;
  55. }