Skip to content

Commit

Permalink
minor formatting and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Nov 15, 2019
1 parent bef2a7c commit 1b4bf8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/server-plus/src/ServerPlus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default class ServerPlus extends Server {
* If you have more than one to compile then always use this
* as calling `server.synthDef` multiple times will start up
* multiple supercollider interpreters. This is harmless, but
* you do have a lot of icons bouncing in your dock.
* very inefficient.
*
* @param defs - An object with `{defName: spec, ...}` where spec is
* an object like `{source: "SynthDef('noise', { ...})"}`
Expand Down Expand Up @@ -345,12 +345,7 @@ export default class ServerPlus extends Server {
* Problem: scsynth uses however many channels there are in the sound file,
* but the client (sclang or supercolliderjs) doesn't know how many there are.
*/
async readBuffer(
path: string,
numChannels = 2,
startFrame = 0,
numFramesToRead = -1,
): Promise<Buffer> {
async readBuffer(path: string, numChannels = 2, startFrame = 0, numFramesToRead = -1): Promise<Buffer> {
const id = this.state.allocBufferID(numChannels);
await this.callAndResponse(msg.bufferAllocRead(id, path, startFrame, numFramesToRead));
return new Buffer(this, id, numFramesToRead, numChannels);
Expand All @@ -360,6 +355,7 @@ export default class ServerPlus extends Server {
* Allocate an audio bus.
*/
audioBus(numChannels = 1): AudioBus {
// TODO: should be a promise that rejects if you run out of busses
const id = this.state.allocAudioBus(numChannels);
return new AudioBus(this, id, numChannels);
}
Expand Down
1 change: 1 addition & 0 deletions packages/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export default class Server extends EventEmitter {
* 'OSC' - OSC responses from the server
*
* Emit signals are deprecated and will be removed in 1.0
* TODO: remove
*
* @deprecated
*
Expand Down

0 comments on commit 1b4bf8e

Please sign in to comment.