Skip to content

Channel Count always 2? #70

@dalisalvador

Description

@dalisalvador

The number of channels on dataavailable ALWAYS seems to be 2(stereo).
No matter the source stream, the output stream always has 2 channels.

I need to get a mono output but I can't accomplish this.

Is there any way to achieve this?

Thanks

                        
recorder = new OpusMediaRecorder(dest.stream <<=== MONO, { mimeType: 'audio/ogg; codecs=opus' }, workerOptions)
recorder.addEventListener('dataavailable', async function (e) {
	if (e.data.size > 0) {
		const offlineAudioContext = new OfflineAudioContext({
			length: 1,
			sampleRate: 48000
		})
		const audioBuffer = await offlineAudioContext.decodeAudioData(await e.data.arrayBuffer())
		console.log(audioBuffer.numberOfChannels) <<< 2!!!				}
	})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions