Hi everybody,
i've got a problem with some mixer-channels.
I have a "source" - channel from a File, wich is plugged into a mixerchannel. Tis mixer is then put into another mixer and that one is played out to the output-device. When I start the source, it is played with twice as fast as it should be. When I pause the application in Visual Studio, the speed is normal. What can I do? The only thing I found in the forum was not o use Channel_GetData on mixer, but I don't do that.
Some Code:
//Create the "Output"-Mixer
int snd = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_SAMPLE_FLOAT);
Channels.AddSend(snd, name);
mixerStallSync = new SYNCPROC(OnMixerStall);
Bass.BASS_ChannelSetSync(snd, BASSSync.BASS_SYNC_STALL, 0L, mixerStallSync, IntPtr.Zero);
Bass.BASS_ChannelPlay(snd, false);
Bass.BASS_ChannelSetDevice(snd, -1);
//Create the first mixer
mx = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_MIXER_NONSTOP | BASSFlag.BASS_STREAM_DECODE);
mixerStallSync2 = new SYNCPROC(OnMixerStall2);
Bass.BASS_ChannelSetSync(mx, BASSSync.BASS_SYNC_STALL, 0L, mixerStallSync2, IntPtr.Zero);
BassMix.BASS_Mixer_StreamAddChannel(snd, mx, BASSFlag.BASS_MIXER_DOWNMIX | BASSFlag.BASS_MIXER_PAUSE);
BassMix.BASS_Mixer_ChannelPlay(mx);
//The source
int stream = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_PRESCAN | BASSFlag.BASS_STREAM_DECODE);
BassMix.BASS_Mixer_StreamAddChannel(mx, stream, BASSFlag.BASS_MIXER_DOWNMIX | BASSFlag.BASS_MIXER_PAUSE);
BassMix.BASS_Mixer_ChannelPlay(stream);
Thanks for every help I get,
Yours Benjamin