Author Topic: [Ubuntu] Huge delay between starting playing and actual sound  (Read 448 times)

gosucherry

  • Posts: 31
Hi!
Im facing some difficulties while playing my sounds. I have streams plugged to the mixer, and im enabling and disabling them by using :

Code: [Select]
BASS_Mixer_ChannelFlags(XXX,0,BASS_MIXER_PAUSE);
and

Code: [Select]
BASS_Mixer_ChannelFlags(XXX,BASS_MIXER_PAUSE,BASS_MIXER_PAUSE);
And the latency between executing this line of code, and actual playback can be measured in seconds... The problem occurs on ubuntu 18.04 LTS 64 bit. The weird thing is, that it used to work just fine (on the other, similiar PC). But after installation of fresh Ubuntu, I cant get it to work! I put some debug printing, and it proved me that the functions are executed instantly, but the playback is very delayed. Not sure where should i start, to debug such thing, since it's much more about compatibility with ubuntu, than code. Thank you in advance for your help!

UPDATE : This is not a case of Ubuntu. It's more about what have changed in .so files. The old version of program works well on old .so files (excluding bassmix.so which was fixed by Mr. Ian). But after updating my .so files to newest, the new delay occurs.

Modification date of my old libs (which works fine) :

libbass.so - 10.03.2016 15:47
libbass_fx.so - 24.12.2014 02:22
libbassmidi.so - 04.12.2014 17:35
libbassmix.so - 06.09.2018 18:38

Modification date of libs that introduces this delay :

libbass.so - 06.02.2018 16:43
libbass_fx.so - 07.06.2018 00:11
libbassmidi.so - 30.03.2017 15:42
libbassmix.so - 06.09.2018 18:38

Maybe it is some internal bug? Or it's about some new parameter which im not using?
« Last Edit: 5 Oct '18 - 10:10 by gosucherry »

Ian @ un4seen

  • Administrator
  • Posts: 21372
I think this could be due to a bug in the BASS_ATTRIB_NOBUFFER option in the BASS 2.4.13 release. Are you using that option? If so, please try using the new BASS_ATTRIB_BUFFER option instead to disable playback buffering, like this:

Code: [Select]
BASS_ChannelSetAttribute(mixer, BASS_ATTRIB_BUFFER, 0);

gosucherry

  • Posts: 31
I think this could be due to a bug in the BASS_ATTRIB_NOBUFFER option in the BASS 2.4.13 release. Are you using that option? If so, please try using the new BASS_ATTRIB_BUFFER option instead to disable playback buffering, like this:

Code: [Select]
BASS_ChannelSetAttribute(mixer, BASS_ATTRIB_BUFFER, 0);

Thank you for your answer! On point, as always :) Indeed I was using BASS_ATTRIB_NOBUFFER attribute, and after implementing suggested fix, everything works fine!

PS. Is there any "Patch Log" where I can find some informations about known bugs in current releases?

Ian @ un4seen

  • Administrator
  • Posts: 21372
Good to hear that switching to BASS_ATTRIB_BUFFER did indeed sort the problem. If you would prefer to stick with BASS_ATTRIB_NOBUFFER, the latest Linux build (including a fix for that) is available here:

   www.un4seen.com/stuff/bass-linux.zip

A list of the changes since the 2.4.13.8 release can be found here:

   www.un4seen.com/forum/?topic=18193.msg127738#msg127738