Author Topic: Determine what type of BASS object a handle is...  (Read 111 times)

VorTechS

  • Posts: 265
...is there any function to determine what type of BASS object a handle is...?

Specifically, I have a visualization wrapper that receives a handle, and I've been playing around sending stream handles. 

But if you try to GetChannelData from a stream that's plugged into a mixer, playback becomes affected as the data isn't available to the mixer (which makes sense).

So I need to determine if a handle is a mixer, or a stream, so that I can call the appropriate function for channel data.

Is that possible?

Also, following up on that, I guess I'd also need to know if a stream is plugged into a mixer ... is that also possible?

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Determine what type of BASS object a handle is...
« Reply #1 on: 28 Nov '17 - 17:37 »
You can check the stream's "ctype" value (with BASS_ChannelGetInfo) to find out what type of BASS channel it is; that will be BASS_CTYPE_STREAM_MIXER if it's a mixer. You can use BASS_Mixer_ChannelGetMixer to find out if a channel is currently plugged into a mixer (and which mixer if so).

VorTechS

  • Posts: 265
Re: Determine what type of BASS object a handle is...
« Reply #2 on: 28 Nov '17 - 20:51 »
That's brilliant, thanks Ian!