Hello everyone,
I have tried all day to find a solution for my problem.
In one scenario there should be the possibility to send a shoutcast stream fed from a player and from an input of the soundcard via WASAPI. Specified individually in the encoder, both work. Together over a Bass_Mixer Channel not. How can I help there?
My Code Snippets:
MixerHandle = BassMix.BASS_Mixer_StreamCreate(SampleRate, 2, BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_SAMPLE_FLOAT Or BASSFlag.BASS_DEFAULT Or BASSFlag.BASS_MIXER_NONSTOP)
Add Player:
PlayerHandle = Bass.BASS_StreamCreateFile(PATH, 0, 0,
BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_SAMPLE_FLOAT)
BassMix.BASS_Mixer_StreamAddChannel(MixerHandle, PlayerHandle, BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_SAMPLE_FLOAT)
Decode Stream by Timer and Threading
Dim need As Integer = Bass.BASS_ChannelSeconds2Bytes(MixerHandle, 0.2)
Dim buffer(need) As Byte
Bass.BASS_ChannelGetData(MixerHandle, buffer, need) ' // decode the data
buffer = Nothing
Send Shoutcast
Dim encoder As IBaseEncoder = Nothing
Dim server As IStreamingServer = Nothing
Dim lame As EncoderLAME
lame = New EncoderLAME(MixerHandle)
lame.EncoderDirectory = Application.StartupPath & "\Plugins"
lame.LAME_Bitrate = _Stream.kbps
lame.LAME_Mode = EncoderLAME.LAMEMode.Default
lame.LAME_TargetSampleRate = _Stream.SampleRate
lame.LAME_Quality = EncoderLAME.LAMEQuality.Q5
encoder = lame
Dim shoutcast As New SHOUTcast(encoder, True)
......
It Works perfect. I can hear the songs from player. Now I want to add a Input signal from soundcard via wasapi to the existing mixer.
BassMix.BASS_Mixer_StreamAddChannel(MixerHandle, WasAPIHandler.InputChannel, BASSFlag.BASS_DEFAULT)
But nothing happens. If I use "
WasAPIHandler.InputChannel" instead "lame = New EncoderLAME(
MixerHandle)", I can hear the signal in stream, but logically without the player

.
Is there a way to implement my project? I am at a loss and hope for help. Many thanks