Skip to content

Commit

Permalink
$mol_audio_scheduled moved duration
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkalica committed Dec 29, 2023
1 parent 8f48ee3 commit b5dbf19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion audio/room/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace $ {
let duration = 0
for (const input of this.input_connected()) {
if (input instanceof $mol_audio_room) duration += input.duration()
if (input instanceof $mol_audio_sample) duration += input.duration()
if (input instanceof $mol_audio_scheduled) duration += input.duration()
}
return duration || this.duration_default()
}
Expand Down
2 changes: 1 addition & 1 deletion audio/sample/sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace $ {
@ $mol_mem
override node() { return this.context().createBufferSource() }

duration() {
override duration() {
return this.audio_buffer().duration * 1000
}

Expand Down
4 changes: 4 additions & 0 deletions audio/scheduled/scheduled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace $ {
throw new Error('implement')
}

duration() {
return 1000
}

@ $mol_mem
node_configured() {
return this.node()
Expand Down
2 changes: 1 addition & 1 deletion audio/vibe/vibe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace $ {

@ $mol_mem
override node() { return this.context().createOscillator() }

@ $mol_mem
freq( next = 440 ) { return next }

Expand Down

0 comments on commit b5dbf19

Please sign in to comment.