Ive made this stream:
public void CreateStream(string filePath)
{
Bass.Init();
_streamInitial = Bass.CreateStream(filePath, 0, 0, BassFlags.Decode);
_stream = BassFx.TempoCreate(_streamInitial, BassFlags.FxFreeSource);
_mixer = BassMix.CreateMixerStream(44100, 2, BassFlags.Default);
BassMix.MixerAddChannel(_mixer, _stream, BassFlags.Default);
}
Can you help on why I can get no sound from this stream.
For using in this PlayMono funtion:
public void PlayMono(bool useLeftChannel, bool stereo = false)
{
if (stereo)
{
// Add stereo stream to mixer (default behavior)
BassMix.MixerAddChannel(_mixer, _stream, BassFlags.Default);
}
else
{
// Split the required channel (left or right)
int[] splitterChannel = useLeftChannel ? new int[] { 0, -1 } : new int[] { 1, -1 }; // Left: 0, Right: 1
var splitter = BassMix.CreateSplitStream(_stream, BassFlags.Decode, splitterChannel);
if (splitter == 0)
{
// Handle error if splitter creation fails
MessageBox.Show("Error: " + Bass.LastError);
return;
}
// Add the selected channel to both sides of the mixer
BassMix.MixerAddChannel(_mixer, splitter, BassFlags.Mono | BassFlags.SpeakerLeft);
BassMix.MixerAddChannel(_mixer, splitter, BassFlags.Mono | BassFlags.SpeakerRight);
}
}
Then I use
Bass.ChannelPlay(_mixer);
But no sound
Thanks