Author Topic: Keep downloading an icecast stream but making it ACTUALLY silent  (Read 129 times)

Azrael128

  • Guest
Hi everyone,

I have a webradio client and I want the following feature: In some situations, I need the stream to be downloaded and processed by bass.dll (so that it keeps returning correct, up-to-date metadata etc.) but no sound to be played.

Up until now I used ChannelSetAttribute to set the volume to 0 via BASS_ATTRIB_VOL. Kinda straightforward. Need no sound? Set volume to 0. This kind of works but in reality, bass.dll keeps outputting a low-level hiss. The Same happens with SetVolume. Is there a way to make it actually silent as if the channel was paused/stopped, while keeping the other features of playing a stream active?

Thanks!

Ian @ un4seen

  • Administrator
  • Posts: 21329
When a channel's BASS_ATTRIB_VOL attribute is set to 0, BASS will generate absolute silence for it (won't play the channel's data at all) but the output device will still be active, and the device itself could have a background hiss. You could try playing the channel to the "no sound" device instead, which the latest BASS build allows. You can get that here:

   www.un4seen.com/stuff/bass.zip

Azrael128

  • Guest
Thanks! So the device is the culprit.

Can I change the device to play to "on the fly" or do I need to close the stream and reopen it on the new device?

Ian @ un4seen

  • Administrator
  • Posts: 21329
Yes, you can move the stream to another device via BASS_ChannelSetDevice. Note that when you have multiple devices initialized, some functions will need you to use BASS_SetDevice to set the device context for them. Please see the BASS_SetDevice documentation for details.

Azrael128

  • Guest
Many thanks, I'll have a look!