I'm want to store the channel number of a playing audio clip as a variable, and I did indeed work out how to read the channel, with this command.
radiochannel = aradio1.Play();
But on compile, I get this message.
radiocontrol.asc(8): Error (line 8): Type mismatch: cannot convert 'AudioChannel*' to 'int'
I thought audio channel was supposed to be returned as an int. What gives?
(Yes this question is pretty dumb. Oh well.)
EDIT: Doh. It seems Audiochannel* is a valid type for a variable. I should think things through more often. I'll see if this fixed my problem and edit the thread one last time.
EDIT 2: And everything works as I wanted it! I shouldn't give up and look for a walkthrough so easily! ;)
As you discovered, the Play function returns an AudioChannel* which should be used like so:
AudioChannel *radiochannel = aradio1.Play();
If for some weird reason you need the integer ID of the channel, that's available through the ID property:
if (radiochannel.ID == n) do_something();
Things to keep in mind, yes, I indeed am fine! My function works nicely now!