Lol

Actually Donal, I tried what you did, ran another program while mine
was running, and it stutters too. I think that may just be the way it
is - foreground processes always get priority. I'm mixing in NDK and
passing the buffer back to Java and passing it to Audiotrack. It's
fast enough to mix eight tracks of 44Khz Stereo data without trouble,
but it still stutters if you try to run another app (and I also have a
higher thread priority on my audio thread like you do).

So I think there is no way around this...

-niko

On Apr 15, 10:57 am, Donal Rafferty <[email protected]> wrote:
> Hi Niko,
>
> Do you just process Audio buffers in the NDK, you dont actually access any
> low level audio classes or streams?
>
>
>
> On Thu, Apr 15, 2010 at 4:51 PM, niko20 <[email protected]> wrote:
> > Also was going to mention that in Android foreground apps always get
> > priority in scheduling regardless of thread priority. Read that in
> > these forums somewhere.
>
> > -niko
>
> > On Apr 15, 10:50 am, niko20 <[email protected]> wrote:
> > > This is why I've moved any new projects that generate audio in the NDK
> > > to create the audio data and pass the buffers back to me. I've seen an
> > > increase in speed in buffer creation (44Khz stereo sound) from 400ms
> > > down to 10ms or so to mix a buffer, over 100x speed increase.
>
> > > It's best to put any audio processing in the NDK to get max speed
> > > possible.
>
> > > -niko
>
> > > On Apr 15, 3:35 am, Jesper Hansen <[email protected]> wrote:
>
> > > > On my N1, my player spends around 15-30% of its time generating the
> > audio
> > > > data. The my player app  has focus everything sounds fine, but when I
> > start
> > > > another app that also requires a lot of cpu time the sounds start to
> > stutter
> > > > badly.
>
> > > > Using top and ps on the N1, I can see that the applications that causes
> > my
> > > > sounds to stutter, have a nice value of 0 (THREAD_PRIORITY_DEFAULT).
> > > > It puzzles me why these applications get more attention from the
> > > > scheduler,than my thread, which runs at nice level -16
> > > > (THREAD_PRIORITY_AUDIO).
>
> > > > On Thu, Apr 15, 2010 at 04:01, ani <[email protected]>
> > wrote:
> > > > > So what you are trying to say is in-between(time it takes to play the
> > > > > audio) the audio writes you are doing some
> > > > > cpu intensive operations which is causing this stuttering ???
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<android-developers%2Bunsubs
> > > > >  [email protected]><android-developers%2Bunsubs
> > [email protected]>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > To unsubscribe, reply using "remove me" as the subject.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2Bunsubs 
> > [email protected]>
> > 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to