Skip to content

openStream crash my microphone on every other application on the machine #32

@juanch0x

Description

@juanch0x

Hi, I'm trying to use the openStream api like the following

const st = rtAudio.openStream(
  undefined,
  {
    deviceId: inputName || rtAudio.getDefaultInputDevice(), // Input device id (Get all devices using `getDevices`)
    nChannels: 1, // Number of channels
    firstChannel: 0, // First channel index on device (default = 0).
  },
  RtAudioFormat.RTAUDIO_SINT16, // PCM Format - Signed 16-bit integer
  48000, // Sampling rate is 48kHz
  1920, // Frame size is 1920 (40ms)
  "MyStream", // The name of the stream (used for JACK Api)
  (pcm) => {
    //logic to detect if the person is with voice active
  },
  () => {}
);
rtAudio.start();

It works as expected, and I can get the data that I need from the inputCallback without issues.

The thing is, when i execute rtAudio.start() every other application stop detecting the audio input from the computer until until I restart that application.

It's any workaround for this? Am I doing something wrong?

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