cpal icon indicating copy to clipboard operation
cpal copied to clipboard

Wasapi only showing one supported stream configuration

Open tahnik opened this issue 3 years ago • 4 comments

Hi, I am trying out the enumerate and feedback example. Here is the output (truncated) of enumerate:

Supported hosts:
  [Wasapi]
Available hosts:
  [Wasapi]
WASAPI
  Default Input Device:
    Some("Wave Link Stream (3- Elgato Wave:3)")
  Default Output Device:
    Some("Headphones (3- Elgato Wave:3)")
  Devices:
  1. "Wave Link Aux 1 (3- Elgato Wave:3)"
    Default output stream config:
      SupportedStreamConfig { channels: 2, sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
    All supported output stream configs:
      1.1. SupportedStreamConfigRange { channels: 2, min_sample_rate: SampleRate(48000), max_sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
  2. "Headphones (3- Elgato Wave:3)"
    Default output stream config:
      SupportedStreamConfig { channels: 2, sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
    All supported output stream configs:
      2.1. SupportedStreamConfigRange { channels: 2, min_sample_rate: SampleRate(48000), max_sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
  3. "34GN850 (NVIDIA High Definition Audio)"
    Default output stream config:
      SupportedStreamConfig { channels: 2, sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
    All supported output stream configs:
      3.1. SupportedStreamConfigRange { channels: 2, min_sample_rate: SampleRate(48000), max_sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
  4. "Speakers (Sound Blaster Z)"
    Default output stream config:
      SupportedStreamConfig { channels: 6, sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
    All supported output stream configs:
      4.1. SupportedStreamConfigRange { channels: 6, min_sample_rate: SampleRate(48000), max_sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }
...

It is showing only one supported stream configuration and Unknown in the buffer range. The feedback example only works if I select an input and output that has the same number of channels, which makes sense I guess. I am pretty sure the 4. "Speakers (Sound Blaster Z)" supports more configuration rather than just a 6 channel configuration. Am I doing something wrong?

tahnik avatar Oct 23 '20 12:10 tahnik

@tahnik Did you ever figure this out?

@est31 (or anyone else) Any idea what is going on here? I am also encountering this on two separate windows machines.

Zageron avatar Apr 06 '22 03:04 Zageron

@Zageron hey, I later moved to PortAudio and used C++ for my project. Can't help you with this unfortunately. You could try the PortAudio bindings for Rust.

tahnik avatar Apr 06 '22 03:04 tahnik

@tahnik Thanks very much for your quick response! :)

Zageron avatar Apr 06 '22 03:04 Zageron

I am investigating. https://github.com/microsoft/windows-rs/issues/1663

Zageron avatar Apr 06 '22 15:04 Zageron