Skip to content

Commit

Permalink
#12 Fix incorrect section marking in waveform
Browse files Browse the repository at this point in the history
  • Loading branch information
tscz committed Jan 19, 2020
1 parent 9b0db66 commit a6c0b9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/audioManagement/audioPlayer.ts
Expand Up @@ -109,10 +109,8 @@ class AudioPlayer implements Player {
if (this.isPlaying()) {
Tone.Transport.stop();
Tone.Transport.start(Tone.now(), normalizedTime);
} else {
Tone.Transport.start(Tone.now(), normalizedTime);
Tone.Transport.pause();
}

this.peaks.emit("player_time_update", normalizedTime);
this.peaks.emit("player_seek", normalizedTime);
};
Expand Down
4 changes: 3 additions & 1 deletion src/components/audioManagement/peaksConfig.ts
Expand Up @@ -45,7 +45,9 @@ class PeaksConfig {
const section = sections.byId[id];

const start = measures.byId[section.measures[0]].time;
const end = start + timePerMeasure;
const end =
measures.byId[section.measures[section.measures.length - 1]].time +
timePerMeasure;

let segment: SegmentAddOptions = {
id,
Expand Down

0 comments on commit a6c0b9b

Please sign in to comment.