[android-developers] Re: Best strategy for emitting countdown tones for shutter delay like stock camera app

2015-12-22 Thread gjs
Hi, Ok here's two simple example (sine wave) tone generators, one uses the 'streaming' method and the other uses the 'static' method, this relates to how the associated memory is allocated / managed. The information / tradeoffs - 'streaming' is useful where sounds might be changed

[android-developers] Re: Best strategy for emitting countdown tones for shutter delay like stock camera app

2015-12-22 Thread gjs
Hi, re Is the AudioTrack itself reusable? Can I simply construct it and set its properties and then play it multiple times? Kind of, you could instantiate the samples (memory) ahead of time and retain these for (re)playing with AudioTrack multiple times but it seems you need to call stop()

[android-developers] Re: Best strategy for emitting countdown tones for shutter delay like stock camera app

2015-12-22 Thread David Karr
On Tuesday, December 22, 2015 at 12:14:37 AM UTC-8, gjs wrote: > > Hi, > > Ok here's two simple example (sine wave) tone generators, one uses the > 'streaming' method and the other uses the 'static' method, this relates to > how the associated memory is allocated / managed. > > The information /

[android-developers] Re: Best strategy for emitting countdown tones for shutter delay like stock camera app

2015-12-21 Thread David Karr
On Sunday, December 20, 2015 at 11:27:14 PM UTC-8, gjs wrote: > > Hi, > > Here's some examples of using AudioTrack > http://www.programcreek.com/java-api-examples/index.php?api=android.media.AudioTrack > > Just be sure to run in a separate thread. > > Regards > Note that I did already say that