Author Topic: Creating multiple streams at the same time  (Read 387 times)

AliAssassiN

  • Posts: 2
Creating multiple streams at the same time
« on: 17 Apr '19 - 15:23 »
Hello and thank you for this awesome library.

I've created a VoIP software with 3D functionalities and used opus for codec, I only used BASS library and I used opus and RakNet (for the network stuff, my game is running using that) separately.
Now my only problem is when I create +2 streams and play them all at once (while they are in different position on the 3D world) there's this weird noise sound and sometimes there's no sound from those streams.

I wonder that if I should use BASSmix here and mix those streams? What's the cause of that noise/no sound when there's 2 streams playing at once?

By the way I create those multiple streams like this: BASS_StreamCreate(44100, 1, BASS_SAMPLE_3D, STREAMPROC_PUSH, nullptr)

and I use BASS_StreamPutData to push my voices to those streams and they are all done in a single thread.

Ian @ un4seen

  • Administrator
  • Posts: 22121
Re: Creating multiple streams at the same time
« Reply #1 on: 17 Apr '19 - 16:01 »
It shouldn't be necessary to use the BASSmix add-on to play multiple streams. What sort of noise is it? You could try setting a BASS_SYNC_STALL sync on the streams (via BASS_ChannelSetSync) and see if that gets triggered. If it does then try feeding data to the stream more quickly (so that the sync doesn't get triggered) and see if the noise still occurs.