Author Topic: Central way to retrieve playback state?  (Read 415 times)

Nuno

  • Posts: 19
Central way to retrieve playback state?
« on: 18 Nov '22 - 13:46 »
Is there any callback which can inform me of playback state changes, like playback got paused, playback got resumed, network bailed out and the sqream is stale, etc? Browsing chm on a mac is a nightmare.

Ian @ un4seen

  • Administrator
  • Posts: 25054
Re: Central way to retrieve playback state?
« Reply #1 on: 18 Nov '22 - 15:32 »
There isn't currently a sync/notification that's triggered by BASS_ChannelPlay/etc calls, but there are syncs for automatic changes: BASS_SYNC_END for the end, BASS_SYNC_STALL for stalling/resuming, BASS_SYNC_DEV_FAIL for output device failures. Also BASS_SYNC_DOWNLOAD for the end of an internet download. Please see the BASS_ChannelSetSync documentation for details.

Regarding browsing the CHM documentation file, the documentation can also be viewed online here:

   www.un4seen.com/doc/

Nuno

  • Posts: 19
Re: Central way to retrieve playback state?
« Reply #2 on: 18 Nov '22 - 15:35 »
Thanks! These offline viewers either do not have searching or are extremely laggy.
Regarding my problem, I need to find some other way then, how can I keep my stateful UI in sync with BASS now?

Ian @ un4seen

  • Administrator
  • Posts: 25054
Re: Central way to retrieve playback state?
« Reply #3 on: 18 Nov '22 - 15:44 »
You could update the UI state when you successfully call BASS_ChannelPlay/Stop/Pause, and use the mentioned syncs to update the state when it's changed by BASS. Alternatively, you can also poll the state with BASS_ChannelIsActive.

radio42

  • Posts: 4786
Re: Central way to retrieve playback state?
« Reply #4 on: 18 Nov '22 - 17:47 »
Here the online doc is not lagging and it has a search...