Author Topic: WASAPI without mixer  (Read 264 times)

udo

  • Posts: 93
WASAPI without mixer
« on: 13 Feb '24 - 21:26 »
Hi Ian
Because you wrote that the mixer is not necessary with WASAPI, a few questions:

Where can i set Volume?
Bass.BASS_ChannelSetAttribute(stream, BASSAttribute.BASS_ATTRIB_VOL, volume)
dont work without mixer.
The function is succesful and with Bass.BASS_ChannelGetAttribute(stream, BASSAttribute.BASS_ATTRIB_VOL, ref value) value is correct.
But no change can be heard.
The volume only changes with BassWasapi.BASS_WASAPI_SetVolume. What am I doing wrong?

Playback without mixer is not ok with mp3(22050 Hz). It is played back too fast. What do I have to change? Wasapi is initialized with
BASSWASAPIInit.BASS_WASAPI_EXCLUSIVE | BASSWASAPIInit.BASS_WASAPI_AUTOFORMAT | BASSWASAPIInit.BASS_WASAPI_BUFFER.
The DAC shows 44.1 kHz

Ian @ un4seen

  • Administrator
  • Posts: 26026
Re: WASAPI without mixer
« Reply #1 on: 14 Feb '24 - 12:56 »
BASS_ATTRIB_VOL indeed doesn't have any effect on a decoding channel (BASS_STREAM_DECODE) unless it's plugged into a mixer, but BASS_ATTRIB_VOLDSP does, so you can use that instead.

Please note that WASAPI only does resampling in shared mode. In exclusive mode (BASS_WASAPI_EXCLUSIVE), only formats supported by the device/driver can be used, so you may still need a mixer (or some other resampling method) then if the wanted format isn't supported.