Author Topic: BASS_ChannelSetAttribute and BASS_ATTRIB_VOL  (Read 72 times)


  • Posts: 44
Good Day,

I am curious to know about BASS_ChannelSetAttribute with BASS_ATTRIB_VOL behaviour .

If i open a mp3 file using BASS_StreamCreateFile on playback device 1.
I want to ChannelGetData from it to get PCM bytes, but dont want to hear it playing on my PC.
And I dont want to use No Sound (device 0), because I want to use device 1 hardware timing on playback . I will poll ChannelGetData every 10 ms.

Can I mute this channel by using BASS_ATTRIB_VOL = 0 , while still getting the original PCM bytes ?

Or must I use ChannelSetDSP on this channel, and get the PCM bytes from DSPPROC , and zeroing those bytes to mute it ?

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: BASS_ChannelSetAttribute and BASS_ATTRIB_VOL
« Reply #1 on: 7 Jan '21 - 17:13 »
The BASS_ATTRIB_VOL setting is applied when generating the final output mix, after the data has left the stream's playback buffer, so its effect will not be present in the data returned by BASS_ChannelGetData. That means you can mute playback and still get the data.

If you want to receive every byte of data (with no gaps or overlap) then calling BASS_ChannelGetData repeatedly during playback is very unlikely to give you that, and you would be better off using a DSP function (DSPPROC) to achieve that.


  • Posts: 44
Re: BASS_ChannelSetAttribute and BASS_ATTRIB_VOL
« Reply #2 on: 8 Jan '21 - 00:42 »
Thank you Ian for the explanation  :)