Author Topic: Bass 2.4.13: Bufferpush Stream and Playback Buffer  (Read 233 times)


  • Posts: 17
For my DVB-S player 2.4.13 behaves differently to when playback is started.

The app uses a DirectShow graph to push audio payloads to bass for things like replay gain, spectrum display and - of course - playback. You were very helpful last year ( to get the creation of the push-stream snappy. After building the DS-graph the app knows about codec/bitrate and can pre-buffer a small amount of frames before the push-stream is created. Overall the tuning/channel changes are done well inside the bounds of the proverbial "blink of an eye". And: the stream plays happily with a playback-buffer level of below 5% (BASS_StreamGetFilePosition(stream,BASS_FILEPOS_BUFFER)/BASS_StreamGetFilePosition(stream,BASS_FILEPOS_END - ratio / buffer settings vanilla / stream creation: BASS_StreamCreateFileUser(STREAMFILE_BUFFERPUSH,BASS_STREAM_BLOCK or BASS_SAMPLE_FLOAT,fprocs,nil) / small adjustment of BASS_ATTRIB_FREQ to sync with the timer of the DVB-S card / all is happening on XP).

Now with 2.4.13
- the creation of the bufferpush-stream is ok (same as with
- after call of BASS_ChannelPlay(stream,false) 2.4.13 fills the playback buffer upto a level of around 70% before playback starts (and this can take same time)

I really would like to test/use some of the new features of 2.4.13 - thank you very much for the ongoing development! Perhaps there are other use cases for bufferpush-streams which need the new behaviour? Or there is a flag/config ... I missed?

Thank you in advance

Ian @ un4seen

  • Administrator
  • Posts: 20679
Re: Bass 2.4.13: Bufferpush Stream and Playback Buffer
« Reply #1 on: 27 Dec '17 - 16:27 »
The asynchronous pre-buffering option introduced in 2.4.13 (see BASS_CONFIG_NET_PREBUF_WAIT) is applied automatically to streams that use the STREAMFILE_BUFFERPUSH system. As you have noted, the BASS_StreamCreateFileUser call will still be quick but playback won't begin until the stream has pre-buffered some data. The amount of data is determined by the BASS_CONFIG_NET_PREBUF setting. To avoid any pre-buffering delay, you can set that to 0.


  • Posts: 17
Re: Bass 2.4.13: Bufferpush Stream and Playback Buffer
« Reply #2 on: 27 Dec '17 - 17:46 »
Thank you ... again!

BASS_CONFIG_NET_PREBUF did the trick, somehow I didn't need to set it with 2.4.12; will look at the manual more closely in future, promise ;)

All the best for 2018 - cheers