summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-08-30 15:08:01 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-08-30 15:08:01 +0200
commitfd7a7851ef99dedf5116dc5dff772445eb670218 (patch)
tree8852d773a2fe5704d7f074842b25f06a1fff93d6
parent536efed3cc2eb1583928cba1a15e5690c6c21385 (diff)
downloaddigitale-debutanten-fd7a7851ef99dedf5116dc5dff772445eb670218.tar.gz
updated recording patch to write a single stereo WAV file
untested
-rw-r--r--rec.ck20
1 files changed, 10 insertions, 10 deletions
diff --git a/rec.ck b/rec.ck
index 10d8d09..5f55eca 100644
--- a/rec.ck
+++ b/rec.ck
@@ -1,23 +1,23 @@
/*
* dac master wave recorder
- * arguments: <base_filename> (default "out")
- * will write <base_filename>_left.wav, <base_filename>_right.wav
+ * arguments: <filename> (default: auto)
*/
if (me.args() > 1)
me.exit();
-"out" => string filename;
+"special:auto" => string filename;
if (me.args() > 0)
me.arg(0) => filename;
-// pull samples from the dac
-dac.chan(0) => WvOut out_left => blackhole;
-dac.chan(1) => WvOut out_right => blackhole;
+/* pull samples from the dac */
+WvOut2 out => blackhole;
+"recording" => out.autoPrefix;
+filename => out.wavFilename;
-filename+"_left.wav" => out_left.wavFilename;
-filename+"_right.wav" => out_right.wavFilename;
-
-<<< "writing to files:", out_left.filename(), out_right.filename() >>>;
+dac.chan(0) => out.left();
+dac.chan(1) => out.right();
+/* keep recording as long as shred is running */
+null @=> out; /* BUG WORKAROUND: dereference "out" on shred exit */
while (day => now);