Author Topic: Mono sound with OGG?  (Read 87 times)


  • Guest
Mono sound with OGG?
« on: 13 Jul '17 - 15:34 »
I want to give the end user the ability to change output to Mono.  Is this possible with OGG?  I set up the bass init to use mono, but then I get no sound.  Unless that's a sound device issue?

Ian @ un4seen

  • Administrator
  • Posts: 20152
Re: Mono sound with OGG?
« Reply #1 on: 13 Jul '17 - 17:48 »
BASS won't automatacally downmix a stereo OGG file to mono when the BASS_DEVICE_MONO flag is used, but you could use the BASSmix add-on to do it, ie. create a mono mixer via BASS_Mixer_StreamCreate and plug the OGG file into it via BASS_Mixer_StreamAddChannel with the BASS_MIXER_DOWNMIX flag set. If you just need both speakers to have the same sound, then another option is to use the BASS_FX add-on's BASS_BFX_MIX effect, something like this:

Code: [Select]
HFX mixfx=BASS_ChannelSetFX(stream, BASS_FX_BFX_MIX, 0); // set a mix effect on the OGG stream
int mixmap[2]={
BASS_BFX_CHAN1|BASS_BFX_CHAN2, // left out = mix of left and right
BASS_BFX_CHAN1|BASS_BFX_CHAN2 // right out = mix of left and right
BASS_BFX_MIX mixparam={mixmap};
BASS_FXSetParameters(mixfx, &mixparam); // apply it

Note that the BASS_FX add-on needs to be loaded before you can use any effects from it. You can force it be loaded by calling a function from it, eg. BASS_FX_GetVersion during initialization.


  • Guest
Re: Mono sound with OGG?
« Reply #2 on: 14 Jul '17 - 07:10 »
Thanks :)