BASS_ChannelUpdate query

Started by SoundMike,

SoundMike

A user has sent me a log file from a run that crashed following (according to the log) a call to BASS_ChannelUpdate that returned a false (0) result, and the error code was BASS_ERROR_ALREADY. On checking the documentation I see that this error means 'The channel is already being updated', so I thought that maybe this isn't really an 'error' and can be ignored. In this run there had been logged 800 previous identical calls to BASS_ChannelUpdate, all of which returned true (1).

I then checked this Forum for any more info about BASS_ChannelUpdate and in the topic Problem with BASS_Mixer_StreamAddChannel I noticed this comment: "Note BASS_ChannelUpdate is only applicable when using normal BASS playback (eg. not through a mixer)".

In my code, the calls to BASS_ChannelUpdate were all to a BASS Mixer Stream. So does this mean I can bypass this call if the handle is for a mixer stream?

Ian @ un4seen

BASS_ChannelUpdate can be used on any stream that has a playback buffer, ie. not decoding channels. That includes mixers, but not mixer sources.

A BASS_ERROR_ALREADY error indicates that the channel's playback buffer is currently being updated already. That could be another BASS_ChannelUpdate call or a BASS_Update call or a normal update cycle (see BASS_CONFIG_UPDATETHREADS). There's usually no need to call BASS_ChannelUpdate (or BASS_Update) if normal update cycles haven't been disabled.

I think it's unlikely that the crash in this case was related to the failed BASS_ChannelUpdate call. Do you also have a dump file from it?

SoundMike

Thanks, Ian. I'll check back with the user regarding a dump file. Since I posted that query I have received more details from the user, who reported "What happened is that the audio stopped working, while the video continued to play... Our technician tried to interrupt the cue and restart it. Unfortunately, at that moment the program froze and Windows opened the "Program not responding" window. At that point the technician had to opt for a forced shutdown."

Ian @ un4seen

That sounds like there was a deadlock rather then a crash. If so, Windows wouldn't have generated a dump file - the user would've had to generate one themselves (eg. using Task Manager's "Create memory dump file" option).

SoundMike

I've sent him a new version of my software where I've bypassed that particular BASS_ChannelUpdate call and asked him to test this fully before using it for a live performance.