[android-developers] Re: loop sound
MODE_STATIC still has a clicking sound when it loops. What I think I
need to do is continuously stream the data via AudioTrack.write(). Any
ideas on how how to manage the timing of this? I was thinking that I
should use setPositionNotificationPeriod() to call a callback every n
frames, and in that callback load up n more frames from my buffer.
On Dec 7, 3:34 am, niko20 <nikolatesl...@yahoo.com> wrote:
> Hi,
>
> Dont know the answer to that one, I haven't used AudioTrack in
> MODE_STATIC much.
>
> -niko
>
> On Dec 6, 11:39 pm, JacobGladish <jacobglad...@yahoo.com> wrote:
>
>
>
> > What is the setLoopPoints (int startInFrames, int endInFrames, int
> > loopCount) on the AudioTrack? Will this cause the play() on a static
> > AudioTrack to loop or do I need to create a streaming AudioTrack and
> > manage my own timer calling write() repeatedly?
>
> > On Dec 7, 12:13 am, JacobGladish <jacobglad...@yahoo.com> wrote:
>
> > > I'm using mostly oggs and it still does it. I'm going to try the
> > > AudioTrack route.
>
> > > On Dec 6, 9:19 pm, niko20 <nikolatesl...@yahoo.com> wrote:
>
> > > > Hi,
>
> > > > Using only the built in Audio stuff (MediaPlayer, SoundPool), the only
> > > > way to get seamless looping is to use samples in OGG format. Otherwise
> > > > you'll need to load the data yourself and play it by shoving it out
> > > > continously into a AudioTrack stream.
>
> > > > -niko
>
> > > > On Dec 6, 8:03 pm, JacobGladish <jacobglad...@yahoo.com> wrote:
>
> > > > > Has anyone been able to play a looping sound without any noticeable
> > > > > delays or ticking sounds when it resets? I tried using the MediaPlayer
> > > > > with setLookup(true). That seems to require that I manually fade-in
> > > > > the sound-bite with volume control slowing incresing in order to work
> > > > > around a nasty tick sound when I call play(), but there's still a very
> > > > > noticeable sound when the it loops. The SoundPool doesn't do any
> > > > > better and also seems to require some unknown delay between loading
> > > > > the sound and playing it.
>
> > > > > I think my SoundPool issue is very similar to this:
>
> > > > >http://code.google.com/p/android/issues/detail?id=1484
>
> > > > > I was hoping to get some feedback from someone who had any experience
> > > > > with this before trying the AudioTrack route.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home