Skip to content

Commit

Permalink
116 Update some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter van der Noord committed Oct 3, 2024
1 parent c32a3a7 commit 77bdd5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/channels/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.4] - 2024-10-03
- Add options to set the startTimeOffset when playing a sound

## [1.0.3] - 2023-01-13
- Make bufferSourceNode on a PlayingSound public

Expand Down
1 change: 1 addition & 0 deletions packages/channels/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ channelsInstance.play('sound', {
loop: true,
fadeInTime: 2,
pan: 1, // between -1 and 1
startTimeOffset: 0, // in seconds
effects: {
preVolume: myEffectsChain,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/channels/src/PlayingSound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class PlayingSound extends HasSignalModifier {
* Gets the current progress of the playing sound (between 0 and 1)
*/
public getProgress = () => {
return (this.getCurrentTime() / this.sound.audioBuffer.duration) % 1;
return this.getCurrentTime() / this.sound.audioBuffer.duration;
};

/**
Expand Down

0 comments on commit 77bdd5e

Please sign in to comment.