History

overload WvOut file open methods; WvOut2 methods now use WvOut file open methods

Ge Wang committed 3 years ago

Commit 0c05dcc1 parent 235502f6 files · +134 −73Browse files

Showing the changes to examples/basic (3 of 6 files). Show all

Unified · Split

3 files
  1. examples/basic/rec-auto-stereo.ck +2 −0
  2. examples/basic/rec-auto.ck +2 −0
  3. examples/basic/rec.ck +10 −3
examples/basic/rec-auto-stereo.ck+2−0
@@ -14,6 +14,8 @@ dac => WvOut2 w => blackhole; · 13 unmodified lines
14 14
15// this is the output file name15// this is the output file name
16"special:auto" => w.wavFilename;16"special:auto" => w.wavFilename;
17// optionally specify bit depth
18// ("special:auto", IO.INT24) => w.wavFilename;
17 19
18// print it out20// print it out
19<<<"writing to file: ", w.filename()>>>;21<<<"writing to file: ", w.filename()>>>;
examples/basic/rec-auto.ck+2−0
@@ -14,6 +14,8 @@ dac => Gain g => WvOut w => blackhole; · 13 unmodified lines
14 14
15// this is the output file name15// this is the output file name
16"special:auto" => w.wavFilename;16"special:auto" => w.wavFilename;
17// optionally specify bit depth
18// ("special:auto", IO.INT24) => w.wavFilename;
17 19
18// print it out20// print it out
19<<<"writing to file: ", w.filename()>>>;21<<<"writing to file: ", w.filename()>>>;
examples/basic/rec.ck+10−3
@@ -1,17 +1,24 @@
1// chuck this with other shreds to record to file1// chuck this with other shreds to record to file
2// example> chuck foo.ck bar.ck rec.ck2// example> chuck foo.ck bar.ck rec.ck
3// (see also rec-auto-stereo.ck)3// (see also rec-auto-stereo.ck)
4 4//
5// arguments: rec:<filename>5// arguments: rec:<filename>
6 6
7// filename
8string filename;
7// get name9// get name
8me.arg(0) => string filename;10if( me.args() > 0 ) me.arg(0) => filename;
9if( filename.length() == 0 ) "foo.wav" => filename;11// default
12if( filename == "" ) "foo.wav" => filename;
10 13
11// pull samples from the dac14// pull samples from the dac
12dac => Gain g => WvOut w => blackhole;15dac => Gain g => WvOut w => blackhole;
13// this is the output file name16// this is the output file name
14filename => w.wavFilename;17filename => w.wavFilename;
18// optionally specify bit depth
19// (filename, IO.INT24) => w.wavFilename;
20
21// print
15<<<"writing to file:", "'" + w.filename() + "'">>>;22<<<"writing to file:", "'" + w.filename() + "'">>>;
16// any gain you want for the output23// any gain you want for the output
17.5 => g.gain;24.5 => g.gain;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t