class library: DUGen - the server now handles audio-rate inputs correctly
[supercollider.git] / SCClassLibrary / Common / Audio / DiskIO.sc
blobb57783a9b7fa68e9662c8196207210ed22a60529
1 DiskOut : UGen {
2         *ar { arg bufnum, channelsArray;
3                 ^this.multiNewList(['audio', bufnum] ++ channelsArray.asArray)
4                 //^0.0          // DiskOut has no output
5                 // now it does: the number of frames written
6         }
7         //      numOutputs { ^1 }
8         //      writeOutputSpecs {}
9         checkInputs {
10                 if (rate == 'audio', {
11                         for(1, inputs.size - 1, { arg i;
12                                 if (inputs.at(i).rate != 'audio', {
13                                         ^("input was not audio rate: " + inputs.at(i));
14                                 });
15                         });
16                 });
17                 ^this.checkValidInputs
18         }
21 DiskIn : MultiOutUGen {
22         *ar { arg numChannels, bufnum, loop = 0;
23                 ^this.multiNew('audio', numChannels, bufnum, loop)
24         }
25         init { arg numChannels, bufnum, loop = 0;
26                 inputs = [bufnum, loop];
27                 ^this.initOutputs(numChannels, rate)
28         }
31 VDiskIn : MultiOutUGen {
32         *ar { arg numChannels, bufnum, rate = 1, loop = 0, sendID = 0;
33                 ^this.multiNew('audio', numChannels, bufnum, rate, loop, sendID)
34         }
35         init { arg numChannels, bufnum, argRate = 1, loop = 0, sendID = 0;
36                 inputs = [bufnum, argRate, loop, sendID];
37                 ^this.initOutputs(numChannels, rate)
38         }