Skip to content

Commit

Permalink
class library: Server - match option.numOutputBusChannels and recChan…
Browse files Browse the repository at this point in the history
…nels

Signed-off-by: Tim Blechmann <tim@klingt.org>
  • Loading branch information
timblechmann committed Nov 23, 2012
1 parent bb4871e commit 3cd0af6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HelpSource/Classes/Server.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ method:: recordNode
Returns:: the current recording synth so that it can be used as a target. This should only be necessary for nodes which are not created in the default group.

method:: recChannels
Get/set the number of channels (int) to record. The default is two. Must be called strong::before:: prepareForRecord.
Get/set the number of channels (int) to record. Is automatically set to the value of link::Classes/ServerOptions#-numOutputBusChannels:: when booting the server. Must be called strong::before:: prepareForRecord.

method:: recHeaderFormat
Get/set the header format (string) of the output file. The default is "aiff". Must be called strong::before:: prepareForRecord.
Expand Down
4 changes: 2 additions & 2 deletions HelpSource/Classes/ServerOptions.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ method:: numControlBusChannels
The number of internal control rate busses. The default is 4096.

method:: numInputBusChannels
The number of audio input bus channels. This need not correspond to the number of hardware inputs. The default is 8.
The number of audio input bus channels. This need not correspond to the number of hardware inputs. The default is 2.

method:: numOutputBusChannels
The number of audio output bus channels. This need not correspond to the number of hardware outputs (this can be useful for instance in the case of recording). The default is 8.
The number of audio output bus channels. This need not correspond to the number of hardware outputs (this can be useful for instance in the case of recording). The default is 2.

method:: numRGens
The number of seedable random number generators. The default is 64.
Expand Down
9 changes: 7 additions & 2 deletions SCClassLibrary/Common/Control/Server.sc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ServerOptions
// order of variables is important here. Only add new instance variables to the end.
var <numAudioBusChannels=128;
var <>numControlBusChannels=4096;
var <numInputBusChannels=8;
var <numOutputBusChannels=8;
var <numInputBusChannels=2;
var <numOutputBusChannels=2;
var numBuffers=1026;

var <>maxNodes=1024;
Expand Down Expand Up @@ -647,6 +647,11 @@ Server {
bootNotifyFirst = true;
this.doWhenBooted({
serverBooting = false;
if (recChannels.notNil and: (recChannels != options.numOutputBusChannels)) {
"Resetting recChannels to %".format(options.numOutputBusChannels).inform
};
recChannels = options.numOutputBusChannels;

if (sendQuit.isNil) {
sendQuit = this.inProcess or: {this.isLocal};
};
Expand Down

0 comments on commit 3cd0af6

Please sign in to comment.