Topic: Music source example

Howdy,

I am using the music source example found on the wiki and for some reason if I start a stream and then go to a different source (Shoutcast for example) and start playing it, my music source keeps playing, so there is then 2 audio streams playing.

All of the other sources seem to "cancel" the currently running stream to allow for the new one to play.  Is there something I am not doing correctly, or is it possible that the example files are out of date?

I didn't change anything in the example files except add some of my own code (very simple though right now).

Thanks in advance.

Re: Music source example

Hmmm - the Control Panel is supposed to tell you to "stopMusic()" when another source starts playing.

Are you using btplay to play the music, or are you doing it through Flash?

There *might* be a bug there that was fixed when the Chumby One's FM radio came along where if the new music source was not using btplay, it would sometimes keep playing the old source.  If that's indeed the problem, it's fixed in a new CP that we should be releasing soon.

3 (edited by cbreeze 2009-11-22 12:11:48)

Re: Music source example

Hi Duane,

No this is using pure btplay.  Everything seems to operate fine, but again just that audio overlap.

There are some strange operations going on though, for example I can start a stream (in my source), and then go into something like iheartradio and the iheartradio widget will show a "stop" button active, even though there is nothing playing in iheartradio.  Now that button doesn't stop my audio, but I can press it and then it changes to a "play" state, at which point I can start the stream (in iheartradio) and it will kill my stream, but not the other way around.

Anyway, I have the files available if you are interested, I am assuming it is something I have introduced, but I just can't see what would have made that happen.

Cheers.

Re: Music source example

There are known bugs in the iheartradio source - does it your source work in combination with SHOUTcast or RFC?

Re: Music source example

Well that's a little odd -- so when trying Shoutcast, my audio source will "pause/mute" (not sure which) as the Shoutcast stream is playing, but once I stop the SC stream my stream starts/unmutes again and continues playing (while I am still in SC).

The interesting thing is that it appears to be running kind of autonomous from the main system.  Is that because it's on the dongle?

Thanks for the help.

Cheers

Re: Music source example

What's weird about this is that that only one source should play at a time, since btplayd is a daemon that will stop the current stream when it's told to play another one.  I have no idea who you were getting two streams playing at the same time, unless you were somehow getting two daemons running.

Is your source getting an explicit "stopMusic" call when your start a SHOUTcast stream?  Do you have some logic that attempts to restart streams that are disconnected, that's somehow being a little overenthusiastic?

Re: Music source example

Found the problem...it's obviously imperative that the "id" in the externalmusic.xml matched the actual source id. roll

Sorry for the false alarm, and thanks for the help.

Cheers.

Re: Music source example

Ah - glad that's what it was.

If you have any suggestions for improvements to the example or documentation, please let us know - or feel free to put together a wiki page.

9 (edited by cbreeze 2009-11-22 13:57:13)

Re: Music source example

Duane wrote:

Ah - glad that's what it was.

If you have any suggestions for improvements to the example or documentation, please let us know - or feel free to put together a wiki page.

The only thing I kind of scratched my head on was where the best integration point would be for dynamic sources.  Right now the example contains hard coded mp3s, so I had to add a little functionality to the player.as to push new sources to the tracks array, which I wasn't sure I really wanted to mess with.  Perhaps a function already in place to push to the tracks array might be interesting...or maybe not! lol

I'll probably put something together once I feel more comfortable with the process. wink

Thanks again.

Cheers.