Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit dfd6551

Browse files
authored
Merge pull request #5802 from matrix-org/travis/voice-messages/sampling
Don't specify sample rates for voice messages
2 parents 3a09c22 + e31ad0e commit dfd6551

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/voice/VoiceRecorder.ts

-4
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,13 @@ export class VoiceRecorder {
5151
private async makeRecorder() {
5252
this.recorderStream = await navigator.mediaDevices.getUserMedia({
5353
audio: {
54-
// specify some audio settings so we're feeding the recorder with the
55-
// best possible values. The browser will handle resampling for us.
56-
sampleRate: SAMPLE_RATE,
5754
channelCount: CHANNELS,
5855
noiseSuppression: true, // browsers ignore constraints they can't honour
5956
deviceId: CallMediaHandler.getAudioInput(),
6057
},
6158
});
6259
this.recorderContext = new AudioContext({
6360
latencyHint: "interactive",
64-
sampleRate: SAMPLE_RATE, // once again, the browser will resample for us
6561
});
6662
this.recorderSource = this.recorderContext.createMediaStreamSource(this.recorderStream);
6763
this.recorderFreqNode = this.recorderContext.createAnalyser();

0 commit comments

Comments
 (0)