Run audio through the Web Audio API instead

This leads to more reliable frequency/timing information, and involves a whole lot less decoding.

We still maintain ongoing encoded frames to avoid having to do one giant encode at the end, as that could take long enough to be disruptive.
This commit is contained in:
Travis Ralston 2021-03-22 19:32:24 -06:00
parent 207ba11da1
commit e352ed1908
2 changed files with 79 additions and 26 deletions

View file

@ -58,8 +58,8 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
await recorder.start();
this.props.onRecording(true);
// TODO: @@ TravisR: Run through EQ component
// recorder.rawData.onUpdate((frame) => {
// console.log('@@ FRAME', frame);
// recorder.frequencyData.onUpdate((freq) => {
// console.log('@@ UPDATE', freq);
// });
this.setState({recorder});
};