The problem is now resolved, I had make several mistakes: I had forgot to release the recorded sound. (record.release();) I hadn't put the complete path for the sdcard which in fact prevented the emulator from loading one. audio-in is useless with windows, plug and play does the job. I didn't play the sound from the path I had recorded it in. The sdcard must be a *.img file and not a *.iso (*.iso doesn't work for me)
thanks On Feb 2, 11:51 pm, Dave Sparks <[email protected]> wrote: > Sorry, I don't have a Windows machine for testing. Maybe one of our > developer advocates can help you with that. > > From the debug spew from the audio input driver, it sounds like it > should be recording. Do you see the file being written to the SD card? > > On Feb 1, 2:45 am, Nicolas Cosson <[email protected]> wrote: > > > Thanks for the advice, > > > I work on windows vista, > > > the audio <backend> found is: > > winaudio Windows wave audio > > But it doesn't work with audio-out and audio-in at the same time for me. > > emulator: warning: opening audio output failed > > > audio-out works alone > > I tested it with the sample provided with the sdk when reading ressources. > > It doesn't when trying to read the sdcard. > > > the sdcard isn't readable in settings too, and it won't launch itself from > > eclipse with the additionnal emulator command line option, but only from > > cmd.exe with the arguments -sdcard sdimg.iso > > > However, the logcat says this repetitivly when I click on record with > > audio-in: > > D/AudioHardware< 25>: AudioStreamInGeneric::read<0x40308160, 320> from fd > > 7 > > > I finally found the sound recorder application you where talking about, I > > haven't tested it yet, but the source code is 100* bigger than > > mine...http://android.git.kernel.org/?p=platform/packages/apps/SoundRecorder... > > > Maybe I have made a mistake somewhere, any help is greatly appreciated > > > thanks for your time > > > On Sun, Feb 1, 2009 at 5:15 AM, Dave Sparks <[email protected]> wrote: > > > > Try this: > > > > emulator -help-audio-in > > > > It will tell you which audio backends are available on your system. > > > You didn't specify what OS you are using. > > > > I think there was also some sample code in the SDK at one point. Maybe > > > one of the developer advocates can point you to it. Another option is > > > to look for the source for the Sound Recorder application on > > > source.android.com. It should be in packages/apps/SoundRecorder. > > > > On Jan 31, 10:45 am, nicolas cosson <[email protected]> wrote: > > > > Hello, > > > > > I have been searching for some time and I can't find a detailled > > > > tutorial on how to easily record and then read audio on the emulator > > > > under eclipse. I have found these steps: > > > > > - You have to install a virtual sd card with mksdcard.exe 1024M > > > > sdimg.iso > > > > > -then run the emulator : emulator.exe -sdcard > > > > sdimg.iso //where sdimg.iso it is the path to > > > > the sdcard > > > > > -then run adb.exe : adb push local_file sdcard/remote_file > > > > > -then you should put : <uses-permission > > > > android:name="android.permission.RECORD_AUDIO"></uses-permission> in > > > > the androidmanifest.xml > > > > > -then there is some code to implement which should look like : > > > > private void startRecord() { > > > > > recorder = new MediaRecorder(); > > > > recorder.setAudioSource(MediaRecorder.AudioSource.MIC); > > > > //ok > > > so > > > > I say audio source is the microphone, is it windows/linux microphone > > > > on the emulator? > > > > recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); > > > > recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); > > > > recorder.setOutputFile("/sdcard/test.3gpp"); > > > > > recorder.prepare(); > > > > recorder.start(); > > > > > } > > > > > -then you should stop with : recorder.stop(); // at some point (I have > > > > no idea when and where to decide to stop but I haven't searched yet) > > > > > -then you should play it. > > > > > I have also heard about : > > >http://code.google.com/intl/fr/android/reference/emulator.html#sdcard > > > > in this page of the manual (~1/4 of the total scroll), there are some > > > > informations about "Emulator Startup Options", one of them is about > > > > Media -audio <backend> > > > > I couldn't find much about that backend thing, google didn't said much > > > > about it. I still don't know if it's important to the audio recording > > > > process. > > > > > The fact is all these steps are pretty blurry to me, and I believe I > > > > am not the only android newbie trying to record some sound :) > > > > > Anyone knows where we can find a complete tutorial "for dummies" > > > > teaching this feature? > > > > > Any help is of course greatly appreciated > > > > > Thanks. > > > > > On 27 jan, 20:08, Breno <[email protected]> wrote: > > > > > > Hey Andrei, > > > > > > To recordaudioit's pretty easy. But, you must record in > > > > > sdcard, only. Be sure your path to file it's pointing to sdcard, and > > > > > you have one mounted in eclipse (or something else). It's working > > > > > perfectly. > > > > > > Regards > > > > > > Breno > > > > > > On Jan 15, 8:58 am, "Andrei Craciun" <[email protected]> wrote: > > > > > > > Thanks David... > > > > > > > 2009/1/15 David Turner <[email protected]> > > > > > > > > the emulator now supportsaudiorecording. If you have problems with > > > it, > > > > > > > you should report mode detailed information about it here > > > > > > > > On Thu, Jan 15, 2009 at 11:05 AM, Andrei Craciun < > > > [email protected]>wrote: > > > > > > > >> Hi All, > > > > > > >> As reported on this blog: > > > >http://blog.roychowdhury.org/2008/04/29/sip-ua-for-android-stack-rtp-...emulator, > > > but everything > > > > > > >> works fine on the real phone. Does anyone has a workaround > > > forrecording > > > > > > >>audioon the emulator? > > > > > > > >> Thanks in advance, > > > > > > >> A. > > > -- > > Nicolas Cosson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

