diff --git a/packages/react-native-audio-api/src/core/AudioBuffer.ts b/packages/react-native-audio-api/src/core/AudioBuffer.ts index 713ead88..7df3045d 100644 --- a/packages/react-native-audio-api/src/core/AudioBuffer.ts +++ b/packages/react-native-audio-api/src/core/AudioBuffer.ts @@ -23,7 +23,7 @@ export default class AudioBuffer { public copyFromChannel( destination: number[], channelNumber: number, - startInChannel: number + startInChannel: number = 0 ): void { this.buffer.copyFromChannel(destination, channelNumber, startInChannel); } @@ -31,7 +31,7 @@ export default class AudioBuffer { public copyToChannel( source: number[], channelNumber: number, - startInChannel: number + startInChannel: number = 0 ): void { this.buffer.copyToChannel(source, channelNumber, startInChannel); } diff --git a/packages/react-native-audio-api/src/core/AudioScheduledSourceNode.ts b/packages/react-native-audio-api/src/core/AudioScheduledSourceNode.ts index 32ec9c46..3b147425 100644 --- a/packages/react-native-audio-api/src/core/AudioScheduledSourceNode.ts +++ b/packages/react-native-audio-api/src/core/AudioScheduledSourceNode.ts @@ -7,11 +7,11 @@ export default class AudioScheduledSourceNode extends AudioNode { super(context, node); } - public start(time: number): void { - (this.node as IAudioScheduledSourceNode).start(time); + public start(when: number = 0): void { + (this.node as IAudioScheduledSourceNode).start(when); } - public stop(time: number): void { - (this.node as IAudioScheduledSourceNode).stop(time); + public stop(when: number = 0): void { + (this.node as IAudioScheduledSourceNode).stop(when); } }