Author Topic: BASS_POS_MIXER_RESET usage  (Read 226 times)

elan

  • Posts: 29
BASS_POS_MIXER_RESET usage
« on: 26 May '19 - 21:58 »
I'm trying to reset a mixer's playback buffer as described in the documentation: "Flush the mixer's playback buffer, so that the new position is heard immediately in the mixer output."

I'm calling it on the mixer itself, like so:

BASS_Mixer_ChannelSetPosition(m_mixer, 0, BASS_POS_MIXER_RESET);

However, this gives me error BASS_ERROR_HANDLE or "handle is not plugged into a mixer". This makes sense, as I'm calling it on the mixer itself, but I thought that's what you were supposed to do with this special flag.

Any tips?

Ian @ un4seen

  • Administrator
  • Posts: 21986
Re: BASS_POS_MIXER_RESET usage
« Reply #1 on: 27 May '19 - 13:25 »
When you just want to reset the mixer's playback buffer, BASS_ChannelSetPosition should be used on the mixer's handle with pos=0. The BASS_POS_MIXER_RESET flag is a convenience option that resets the mixer's playback buffer at the same time as setting a source's position, ie. it avoids the need for a separate BASS_ChannelSetPosition call on the mixer.

elan

  • Posts: 29
Re: BASS_POS_MIXER_RESET usage
« Reply #2 on: 27 May '19 - 20:34 »
Ah that makes sense, sorry I was too dumb to realize that!