Skip to content

Commit

Permalink
feat: added default params values
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Makowski committed Oct 25, 2024
1 parent 925b6f3 commit 9375e4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-native-audio-api/src/core/AudioBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export default class AudioBuffer {
public copyFromChannel(
destination: number[],
channelNumber: number,
startInChannel: number
startInChannel: number = 0
): void {
this.buffer.copyFromChannel(destination, channelNumber, startInChannel);
}

public copyToChannel(
source: number[],
channelNumber: number,
startInChannel: number
startInChannel: number = 0
): void {
this.buffer.copyToChannel(source, channelNumber, startInChannel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 9375e4c

Please sign in to comment.