@@ -15,12 +15,11 @@ limitations under the License.
1515*/
1616
1717import React from "react" ;
18- import { IRecordingUpdate , VoiceRecording } from "../../../voice/VoiceRecording" ;
18+ import { IRecordingUpdate , RECORDING_PLAYBACK_SAMPLES , VoiceRecording } from "../../../voice/VoiceRecording" ;
1919import { replaceableComponent } from "../../../utils/replaceableComponent" ;
2020import { arrayFastResample , arraySeed } from "../../../utils/arrays" ;
2121import { percentageOf } from "../../../utils/numbers" ;
2222import Waveform from "./Waveform" ;
23- import { PLAYBACK_WAVEFORM_SAMPLES } from "../../../voice/Playback" ;
2423
2524interface IProps {
2625 recorder : VoiceRecording ;
@@ -38,14 +37,14 @@ export default class LiveRecordingWaveform extends React.PureComponent<IProps, I
3837 public constructor ( props ) {
3938 super ( props ) ;
4039
41- this . state = { heights : arraySeed ( 0 , PLAYBACK_WAVEFORM_SAMPLES ) } ;
40+ this . state = { heights : arraySeed ( 0 , RECORDING_PLAYBACK_SAMPLES ) } ;
4241 this . props . recorder . liveData . onUpdate ( this . onRecordingUpdate ) ;
4342 }
4443
4544 private onRecordingUpdate = ( update : IRecordingUpdate ) => {
4645 // The waveform and the downsample target are pretty close, so we should be fine to
4746 // do this, despite the docs on arrayFastResample.
48- const bars = arrayFastResample ( Array . from ( update . waveform ) , PLAYBACK_WAVEFORM_SAMPLES ) ;
47+ const bars = arrayFastResample ( Array . from ( update . waveform ) , RECORDING_PLAYBACK_SAMPLES ) ;
4948 this . setState ( {
5049 // The incoming data is between zero and one, but typically even screaming into a
5150 // microphone won't send you over 0.6, so we artificially adjust the gain for the
0 commit comments