Monday, May 17, 2010

Re: [android-developers] JetPlayer help

Well, again, to answer my own question....

I ran some tests and it looks like the behavior is as it is described, you CAN queue segments after the jetplayer starts playing.  The caveat is that queueing a segment takes time and if the existing segments finish before the one you are queuing is done queuing (think on the terms of several hundred milliseconds), then the jetplayer will NOT play the new segments or any subsequent segments being queued.

How do you get around this?  Well, it looks like you need to queue your segments wisely.  It appears that you are only allowed to have 3 segments queued at a time.  If these happen to be very short segments, then odds are any segments you queue up after these start will not work.  You will not be able to have a seamless stream.  In order to have seamless playing of your segments, then, in my tests, you need to have at least a couple of beats as a buffer for the "dynamic" queueing to work.

In my experience with JetPlayer, it seems like it is best suited to play one continuous segment of music and use triggers to turn on tracks of your Midi to add effects during certain segments of play.

I hope this information helps some people out there who might stumble down the sparsely documented realm of JetPlayer.

On Sun, May 16, 2010 at 4:15 PM, Justin <jtgiles@gmail.com> wrote:
I'm attempting to use JetPlayer in my application.  I am able to queue
segments up and play them successfully, however if I try to queue a
segment while an existing segment is playing, it doesn't play the
segment that was just queued when the first one finishes.  In the
JetBoy example, it alludes to the idea that segments can be added
during game play:

       // JET info: now we're all set to prepare queuing the JET
audio segments for the game.
       // JET info: in this example, the game uses segment 0 for the
duration of the game play,
       // JET info: and plays segment 1 several times as the "outro"
music, so we're going to
       // JET info: queue everything upfront, but with more complex
JET compositions, we could
       // JET info: also queue the segments during the game play.

So, what I am doing is queueing 3 segments up front, which play fine.
When one segment finishes, I queue up a couple more segments.  The
first 3 segments play fine and the queue says that it has the new
segments in it, however it doesn't play the ones added later.

Anyone have any experience with this?  Am I understanding things
correctly?

Thanks,

Justin

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment