No success stories on onMarkerReached() from others, so I've now
submitted a bug report http://code.google.com/p/android/issues/detail?id=2563

Regards

On May 1, 12:37 pm, blindfold <seeingwithso...@gmail.com> wrote:
> Should I file a bug report for Cupcake's onMarkerReached() 
> inAudioTrackplayback? The only workaround I currently have for
> onMarkerReached() never getting invoked is to explicitly poll
> getPlaybackHeadPosition(), while taking into account extra margins for
> sample rates 11025 and 22050 because there the getPlaybackHeadPosition
> () does not quite reach the expected end values - as described in my
> previous post.
>
> Regards
>
> On Apr 30, 10:02 pm, blindfold <seeingwithso...@gmail.com> wrote:
>
> > Has anybody had any success with OnPlaybackPositionUpdateListener? I'm
> > successfully playing one-second PCM sound clips withAudioTrackin
> > MODE_STATIC mode (although the playback often appears truncated), but
> > no matter what I do, onMarkerReached() is never called. I set
> > setNotificationMarkerPosition() to a position a bit less than my
> > sample count. I do not have any such problems with its MediaPlayer
> > counterpart setOnCompletionListener(). I simply want onMarkerReached()
> > to run when myAudioTrackinstance has finished playing, but the
> > getPlayState() remains PLAYSTATE_PLAYING after myAudioTrackhas
> > finished sounding. What might be wrong? What does it take to get
> >AudioTrackto run onMarkerReached() at the end of the data? Any
> > concrete sample code for this that works?
>
> > Another strange thing is that at the end of a one second sound at
> > sample rate 16000, getPlaybackHeadPosition() returns 16000 as
> > expected, but for a sample rate of 22050 getPlaybackHeadPosition()
> > becomes consistently 22016, for a sample rate of 11025
> > getPlaybackHeadPosition() becomes 11008, while for a sample rate of
> > 8000 the getPlaybackHeadPosition() returns consistently 8000 again.
> > Are the discrepancies for sample rates of 11025 and 22050 due to
> > rounding inaccuracies in theAudioTracksample rate divider?
>
> > Thanks
>
>
--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to