Author Topic: BassMix.BASS_Mixer_StreamAddChannelEx  (Read 1326 times)

AlanKavo92

  • Posts: 12
BassMix.BASS_Mixer_StreamAddChannelEx
« on: 23 Apr '14 - 00:57 »
.
« Last Edit: 25 Apr '14 - 08:49 by AlanKavo92 »

AlanKavo92

  • Posts: 12
Re: BassMix.BASS_Mixer_StreamAddChannelEx
« Reply #1 on: 23 Apr '14 - 02:31 »
.
« Last Edit: 25 Apr '14 - 08:49 by AlanKavo92 »

AlanKavo92

  • Posts: 12
Re: BassMix.BASS_Mixer_StreamAddChannelEx
« Reply #2 on: 23 Apr '14 - 03:57 »
The problem was using songs.Length when creating the MixerStream.

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: BassMix.BASS_Mixer_StreamAddChannelEx
« Reply #3 on: 23 Apr '14 - 17:39 »
It looks like the problem may be that you're basing the BASS_Mixer_StreamAddChannelEx "start" parameter value on the source's sample format rather than the mixer's. Note it should be based on the mixer's output format, ie. the new source will be started after the mixer has produced the specified amount of output. You could do something like this...

Code: [Select]
long start=BASS.BASS_ChannelSeconds2Bytes(MixerStream, SongLengthInSeconds[0]-GetMusicBarInSeconds(32));
BassMix.BASS_Mixer_StreamAddChannelEx(MixerStream, Streams[1], BASSFlag.BASS_STREAM_AUTOFREE | BASSFlag.BASS_MIXER_DOWNMIX, start, 0);