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();
--~--~---------~--~----~------------~-------~--~----~
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