[android-developers] Re: loop sound

2009-12-08 Thread JacobGladish
After loading the file in Audacity (windows vista) and looping it, it revealed that my file simply didn't play cleanly. The original audio sources I have are in apple's core audio format. The funny thing is that I used quicktime pro to convert them from .caf to .wav, and then both mp3 and ogg

[android-developers] Re: loop sound

2009-12-07 Thread niko20
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

[android-developers] Re: loop sound

2009-12-07 Thread JacobGladish
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

[android-developers] Re: loop sound

2009-12-07 Thread niko20
Hi, you don't need a callback. write() blocks until more data is needed. So you could just make a separate thread that pushes the data out as fast as write() will let it. -niko On Dec 7, 9:02 am, JacobGladish jacobglad...@yahoo.com wrote: MODE_STATIC still has a clicking sound when it loops.

[android-developers] Re: loop sound

2009-12-07 Thread niko20
One other thing - are you sure your sound is really loopable? Load it into Audacity and play it in looped mode, does it not have the click then? Just to check! -niko On Dec 7, 9:51 am, niko20 nikolatesl...@yahoo.com wrote: Hi, you don't need a callback. write() blocks until more data is

[android-developers] Re: loop sound

2009-12-07 Thread JacobGladish
I'll definitely test in audacity. I've been converting audio files to/ from just about every format over the past few days. It's possible it has gotten corrupted along the way. Thanks for the suggestion. On Dec 7, 10:53 am, niko20 nikolatesl...@yahoo.com wrote: One other thing - are you sure

[android-developers] Re: loop sound

2009-12-06 Thread niko20
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

[android-developers] Re: loop sound

2009-12-06 Thread JacobGladish
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

[android-developers] Re: loop sound

2009-12-06 Thread JacobGladish
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