This discussion is moving beyond the charter of android-developers
(which is about developing Android applications with the SDK). A
better place for this is android-discuss or maybe android-framework.

FYI, neither the G1 or the emulator use ALSA drivers.

On Jan 18, 3:11 pm, "Matt Flax" <flat...@gmail.com> wrote:
> Oh, OK.
>
> thanks for the info.
>
> Actually I like your idea, however we are implementing a more professional
> grade sound level meter.
> It is implemented using signal processing filters and integrators.
>
> For that reason, we require access to the actual samples.
>
> it seems that the only way to get this happening at the moment would be to
> hack the device and use the ALSA sound driver.
> What do you think ?
>
> thanks
> Matt
>
> On Sat, Jan 17, 2009 at 6:44 PM, Dave Sparks <davidspa...@android.com>wrote:
>
>
>
>
>
> > OK, now I see where you going with it. :)
>
> > What you want is coming in Cupcake. There is a streaming interface for
> > audio input and output that gives you an array of audio samples you
> > can do your signal processing on.
>
> > If you need something for SDK 1.0, there is a MediaRecorder function
> > called getMaxAmplitude(). You should be able to get what you want by
> > writing the audio file to /dev/null and calling into getMaxAmplitude
> > periodically. Take a look at the source code for SoundRecorder on
> > android.git.kernel.org.
>
> > On Jan 16, 3:20 pm, "Matt Flax" <flat...@gmail.com> wrote:
> > > we are implementing a sound level meter. For privacy reasons, we don't
> > want
> > > the audio lying around on the disk.
>
> > > We could do it on the fly without recording to disk, however I don't
> > think
> > > that is possible with the sdk ... is it ?
>
> > > Matt
>
> > > On Fri, Jan 16, 2009 at 12:16 PM, Dave Sparks <davidspa...@android.com
> > >wrote:
>
> > > > I am pretty sure that won't work. Why do you want to record a bunch of
> > > > small audio files without dropping samples?
>
> > > > On Jan 14, 7:52 pm, flatmax <flat...@gmail.com> wrote:
> > > > > Hi there,
>
> > > > > Has anyone managed to record audio to small files without dropping
> > > > > samples between ?
>
> > > > > perhaps it is possible to use two recorders which toggle between
> > > > > recording states ... when on is recording, the other is priming and
> > > > > waiting to record ...
>
> > > > > Something like :
>
> > > > > //declare two recorders
> > > > > MediaRecorder recorder1 = new MediaRecorder();
> > > > > MediaRecorder recorder2 = new MediaRecorder();
>
> > > > > /// continuously prime, start and stop the two streams so one is
> > > > > always capturing ...
>
> > > > > //prime and start recorder1 - this is the loop roll in
> > > > > recorder1.setAudioSource
> > > > > recorder1.setOutputFormat
> > > > > recorder1.setAudioEncoder
> > > > > recorder1.setOutputFile
> > > > > recorder1.prepare
> > > > > recorder1.start
>
> > > > > while (1){
>
> > > > > //prime and start recording from recorder2
> > > > > recorder2.setAudioSource
> > > > > recorder2.setOutputFormat
> > > > > recorder2.setAudioEncoder
> > > > > recorder2.setOutputFile
> > > > > recorder2.prepare
>
> > > > > //wait a certain ammount of time to allow capture
> > > > > sleep
>
> > > > > recorder2.start
>
> > > > > recorder1.stop
> > > > > recorder1.reset
>
> > > > > //prime recorder1
> > > > > recorder1.setAudioSource
> > > > > recorder1.setOutputFormat
> > > > > recorder1.setAudioEncoder
> > > > > recorder1.setOutputFile
> > > > > recorder1.prepare
>
> > > > > //wait a certain ammount of time to allow capture
> > > > > sleep
>
> > > > > /// switch recorders
> > > > > recorder1.start
>
> > > > > recorder2.stop
> > > > > recorder2.reset
>
> > > > > }
>
> > > > > recorder1.release();
> > > > > recorder2.release();
>
> > > --http://www.flatmaxstudios.com
>
> --http://www.flatmaxstudios.com
--~--~---------~--~----~------------~-------~--~----~
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