Author Topic: Does Bass.BASS_StreamCreateURL save url for reuse so there are no duplicates?  (Read 1176 times)

Mike de Groot

  • Guest
Hello,

I've had a question on how Bass manages the sources of streams.
I've had the following question: 'Does Bass.BASS_StreamCreateURL save url for reuse so there are no duplicates?'

What i mean by that:

If you use a url to get a stream. does the url get saved so if the same url gets requested it will get the existing stream and duplicate the incomming buffer from the stream when send to something like an output channel of ASIO?

I've had this question in mind for 2 days now and couldn't find out myself because the network doesn't get overloaded when reusing url's at the same time and couldn't look into the code to check if the resources get saved anywhere.

My code:
Code: [Select]
stream1 = Bass.BASS_StreamCreateURL(path, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT, null, IntPtr.Zero);
stream2 = Bass.BASS_StreamCreateURL(path, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT, null, IntPtr.Zero);
Does it make 2 http requests or just 1?

Hope anyone knows the solution to this.

Mike de Groot

  • Guest
Code language i use it C#. (Just so you know) ;)

radio42

  • Posts: 4661
No, I assume Bass would fetch the data twice - ie. for each stream independently.

However, you might use the BASSmix addon and the Splitter functionality it provides to re-use the stream and split it into two sources.

Mike de Groot

  • Guest
No, I assume Bass would fetch the data twice - ie. for each stream independently.

However, you might use the BASSmix addon and the Splitter functionality it provides to re-use the stream and split it into two sources.

Is BassMix included in the Bass licence or the BassAsio licence or a total different one?

Mike de Groot

  • Guest
No, I assume Bass would fetch the data twice - ie. for each stream independently.

However, you might use the BASSmix addon and the Splitter functionality it provides to re-use the stream and split it into two sources.

Also, Thanks for this awesome suggestion and help!

Ian @ un4seen

  • Administrator
  • Posts: 22036
Is BassMix included in the Bass licence or the BassAsio licence or a total different one?

The BASSmix add-on is free to use with BASS. So when you're licensed to use BASS, you can also use BASSmix.

Mike de Groot

  • Guest
Is BassMix included in the Bass licence or the BassAsio licence or a total different one?

The BASSmix add-on is free to use with BASS. So when you're licensed to use BASS, you can also use BASSmix.

Ah okay. nice!
I've looked into it but I couldn't find a way to split the current stream and use it for asio.

Can anyone send me a bit in the right direction?
Im also trying to resample 44100Hz to 48000Hz. Is this possible with the BassAsioHandler class? (like before or after initializing BassAsioHandler?)

Mike de Groot

  • Guest
Is BassMix included in the Bass licence or the BassAsio licence or a total different one?

The BASSmix add-on is free to use with BASS. So when you're licensed to use BASS, you can also use BASSmix.

Ah okay. nice!
I've looked into it but I couldn't find a way to split the current stream and use it for asio.

Can anyone send me a bit in the right direction?
Im also trying to resample 44100Hz to 48000Hz. Is this possible with the BassAsioHandler class? (like before or after initializing BassAsioHandler?)


Found a way to split!
Still wondering how to convert the sample rate from 44100Hz to 48100Hz without speeding up the sound (So 44100Hz quality over 48000Hz)

radio42

  • Posts: 4661
A BASSmix mixer stream might apply the re-sampling for you. Ie. you feed your source (e.g. 44.1kHz) to a mixer channel (which is defined as 48kHz).