comparison src/app/visualisations/waveform/waveform.component.ts @ 414:0329495fd822

Revert that, probably sensible to set the duration with the audio buffer.
author Lucas Thompson <dev@lucas.im>
date Mon, 05 Jun 2017 14:34:03 +0100
parents 24df6a0d61c8
children 64ed45a0bad3
comparison
equal deleted inserted replaced
413:24df6a0d61c8 414:0329495fd822
16 {provide: WavesComponent, useExisting: WaveformComponent} 16 {provide: WavesComponent, useExisting: WaveformComponent}
17 ] 17 ]
18 }) 18 })
19 export class WaveformComponent extends WavesComponent<AudioBuffer> { 19 export class WaveformComponent extends WavesComponent<AudioBuffer> {
20 @Input() set audioBuffer(buffer: AudioBuffer) { 20 @Input() set audioBuffer(buffer: AudioBuffer) {
21 this.duration = buffer.duration;
21 this.timeline.pixelsPerSecond = this.timeline.visibleWidth / buffer.duration; 22 this.timeline.pixelsPerSecond = this.timeline.visibleWidth / buffer.duration;
22 this.feature = buffer; 23 this.feature = buffer;
23 } 24 }
24 25
25 protected get featureLayers(): Layer[] { 26 protected get featureLayers(): Layer[] {