Anyone successfully recording mic audio and playing it back on ios?

hey all
i am having a lot of annoying problems with recording microphone audio and playing it back on the iPhone (same app works flawlessly on desktop and android)
has any of you successfully done that?
Saar

@Varun Bhatia,
yes i can
my simple recording test app works great on the desktop and on Android.
on the other hand, on ios (iPhone 3gs, latest os) i sometimes hear nothing on playback, sometimes just the end of the recording, sometimes the playback is stuttering.
thanx,
Saar
i am using flash pro cs5.5 overlayed with the AIR 3 sdk.
the FLA contains two movieclips on stage named "recorder" and "player". they act as buttons. all the code is in the document class:
package  {
          import flash.display.Sprite;
          import flash.media.Microphone;
          import flash.media.Sound;
          import flash.media.SoundChannel;
          import flash.events.MouseEvent;
          import flash.events.SampleDataEvent;
          import flash.utils.ByteArray;
          import flash.events.Event;
          import flash.media.SoundMixer;
          import flash.media.AudioPlaybackMode;
          public class RecTest extends Sprite {
                    var mic:Microphone;
                    var s:Sound;
                    var sc:SoundChannel;
                    var nowRecording:Boolean = false;
                    var nowPlaying:Boolean = false;
                    var recordedBytes:ByteArray;
                    public function RecTest() {
                              SoundMixer.audioPlaybackMode = AudioPlaybackMode.MEDIA;
                              mic = Microphone.getMicrophone();
                              mic.rate = 44;
                              mic.gain = 70;
                              mic.setSilenceLevel(0);
                              s = new Sound();
                              recordedBytes = new ByteArray();
                               recorder.addEventListener(MouseEvent.CLICK, record);
                               player.addEventListener(MouseEvent.CLICK, playBack);
                    function record(e:MouseEvent) {
                              if (!nowRecording) {
                                        trace("recording");
                                        recordedBytes.clear();
                                        mic.addEventListener(SampleDataEvent.SAMPLE_DATA, getMicAudio);
                                        nowRecording = true;
                              } else {
                                        trace("recording stopped");
                                        mic.removeEventListener(SampleDataEvent.SAMPLE_DATA, getMicAudio);
                                        nowRecording = false;
                    function getMicAudio(e:SampleDataEvent) {
                              recordedBytes.writeBytes(e.data);
                    function playBack(e:MouseEvent) {
                              if (!nowPlaying) {
                                        trace("playing");
                                        recordedBytes.position = 0;
                                        s.addEventListener(SampleDataEvent.SAMPLE_DATA, playAudio);
                                        sc = s.play();
                                        sc.addEventListener(Event.SOUND_COMPLETE, stopPlayback, false, 0, true);
                                        nowPlaying = true;
                              } else {
                                        sc.stop();
                                        stopPlayback();
                    function stopPlayback(e:Event=null) {
                              trace("playing stopped");
                              s.removeEventListener(SampleDataEvent.SAMPLE_DATA, playAudio);
                              nowPlaying = false;
                    function playAudio(e:SampleDataEvent) {
                              for (var i:int = 0; i < 8092 && recordedBytes.bytesAvailable > 0; i++) {
                                        var sample:Number = recordedBytes.readFloat();
                                        e.data.writeFloat(sample);
                                        e.data.writeFloat(sample);

Similar Messages

  • VoIP Phone Call from mobile to PC - Streaming the audio and playing it back

    In short:
    How can I stream the audio captured from a mobile to PC and play it back.
    In brief:
    I am trying to develope an application to chat(voice) between a J2ME program and a Java program which is running in a PC.
    Currently I am able to send and receive the text message by using SIP protocol after establishing session by using SIP protocol.
    As a next step, I want to capture the audio and play back in PC and Mobile.
    Now, I am able to capture audio from the microphone of the mobile.
    Player p =Manager.createPlayer("capture://audio?rate=8000&bits=8&Channels=1");
                    p.realize();
                    // get the RecordControl over this Player
                    RecordControl rc = (RecordControl)p.getControl("RecordControl");
                    // create an OutputStream which the RecordControl will use
                    // to write write the recorded data.
                    ByteArrayOutputStream output = new ByteArrayOutputStream();
                    rc.setRecordStream(output);
                    // start the recording
                    rc.startRecord();
                    p.start();How can I stream it to PC and play it back? Also, I need to send audio captured from PC to mobile and have to play it back.
    Pl. do reply.

    now I am able to play the stream (with some delay),
    while(inputStream.read(buf)!=-1) {
                        try {
                            ByteArrayInputStream recordedInputStream = new ByteArrayInputStream(buf);
                            play2 = Manager.createPlayer(recordedInputStream, "audio/x-wav");
                            System.out.println("Playback player created...");
                            play2.prefetch();
                            System.out.println("Playback player prefetched...");
                            play2.realize();
                            System.out.println("Playback player realized...");
                            play2.start();
                            System.out.println("Playback player started...");
                        } catch (MediaException ex) {
                            ex.printStackTrace();
                        } catch(Exception e) {
                            e.printStackTrace();
                        }But, the problem is , I have to play the audio, as well as capture the audio to create the duplex communication.
    Is it possible to do the audio capture and playback simultaneously? If it is not possible, pl suggest an idea to achieve this.
    null

  • My speaker doesn't work. I record a video and play it back, but there is no sound. Help??

    My iphone 5 speaker doesn't work. I go to record a video but there is no playback sound.

    Do you have the mute switch on? Next to volume buttons - shows orange when mute is on. Other than that just making sure the volume is turned up. It should work.

  • Will recording mic audio in mp3 codec be supported by FMS in the future

    I am newbb to flash. I am developping a mobile app for video chat using FL3. Then I realized that FL3.x only support mp3 streaming for now. So I turn to the server side and found that FMS3.5.1 doesn't support record or live mic audio in mp3. This causes a quite difficult situation. I am wondring if there's a solution/workaround for this? And mostly importantly, I am wondering if recording mic audio in mp3 is ever going to be supported. If anyone can answer this.

    Hi Bob,
    Regarding "when will flashplayer support mp3 encoding" ...
    Jay's lowdown is 100% correct.  And definitely don't hold your breath waiting  ;-)
    My sense is that internally Adobe fiercely guards against bloat in the size of the Flash Player installers.  Fiercely.
    But now they have AIR too.  And Acrobat.  (Both of which now include Flash Player in their current versions.)
    Personally, I would settle for MP3 encoding in AIR as a first step.  Plus, VP6 and H.264 in AIR.
    My sense is that the hurdle against bloat in the AIR installer size is dramatically lower.  And we definitely need these additional encoding capabilities built-in to some runtime.
    So, whenever you have a chance to lobby Adobe engineers or submit requests to their wishlist, just keep asking.
    g

  • How do I record myself singing and playing and still be able to manipulate the volume of either the voice or the guitar? Or is that possible?

    How do I record myself singing and playing and still be able to manipulate the volume of either the voice or the guitar? Or is that possible? I have a single mic.

    GarageBand cannot unix audio files and split them into separate tracks.
    Record the guitar and the vocals to separate tracks. If you only have one microphone, record both tracks separately, one after the other.

  • Simultaneous Recording in file and  playing incoming rtp stream

    I want to Simultaneous Recording in file and  playing incoming rtp stream.I have cloned the data source. After cloning I created two data sinks and two processors.One processor/datasink is meant for recording the stream in a file and other processor/data sink is used to play the rtp through speaker.
    But at a time I am only able to achieve one operation i.e either recording or playing.For recording into the wav file I have to put Thread.sleep(30) so that I can record the rtp into the file.During this time I am not able to play the audio through speaker.I also create separate thread but this does not help.
    Please give suggestion on how to resolve this issue.

    thanks for the reply, but I think I've already solved the problem.

  • Is it possible to mute video audio and play music?

    I am trying to put together a video and would like to at one point in the video mute the video audio and play a bit of music during the video and then after that section un mute the video audio and mute the music.
    Can this be done in iMovie 09 and if so how?
    Thanks

    If you're Airplaying from you computer, you might be able to do this. Here's what I would try:
    Go to the Airplay icon in iTunes. You should see both your Apple TV and your speakers listed as options. Select "Multiple speakers." You'll see both devices together. Turn the volume all the way down on the Apple TV. You should be getting the video on the TV, but only hear audio through the speakers.
    Using the "Multiple Speakers" option will sync the output of your devices so that the sound matches the picture.
    I haven't tried this myself, but I'm thinking this would work. However, this approach will only work when using Airplay from your computer – not from am iPad or iPhone – as they don’t have the "Multiple Speakers" option (as far as I know). It also won't work with content streamed directly to your ATV, obviously, because there's no way to stream from ATV to other devices.
    Let me know if this works.

  • Record webcam audio and video

    hi
    there is a way to record the stream of webcam without use media server or similars servers?
    as3 with flash or air can do that? record both audio and video?
    i found a air class that record video capturing bitmap data of each frame and saves to a byte array but no record audio
    can i save only the micriphones audio in mp3 without a server?
    thankk
    gustav

    You can use the Flash Media Live Encoder to both stream Live video or as a simple recorder, by unselecting "Stream to FMS" and checking "Save to Disk"
    It's free, works well... get it here:
    http://www.adobe.com/products/flashmediaserver/flashmediaencoder/
    There is also a section here in the Adobe Forums dedicated to the software if you need more info.
    Best wishes,
    Adninjastrator

  • Does QT Pro for Mac allow webcast recording of Audio and Video?

    While watching a webcast, say from NY Times, I'd like to record both audio and video via QT Pro (for later viewing). Before I spend $$ to upgrade to QT Pro, can this be done?

    If the file being viewed is loaded via the QuickTime browser plug-in (part of the html page code) then the file can be saved (after it has ben downloaded). If the file isn't loaded by the QuickTime browser plug-in then it can't be saved (locally via the Pro upgrade).
    QuickTime Player Pro can't "record" the screen (QuickTime X can, but only at the screen resolution).
    Look in the Help menu of QuickTime X to learn more about the options.

  • I use imovie to create videos. When I burn the video to DVD and play it back there is digital breakup in the playback from the DVD It does not shoe in p[layback on the computer. I understand there isd some file I need to delete and reboot the imovie to co

    I use imovie to create videos. When I burn the video to DVD and play it back there is digital breakup in the playback from the DVD. The digital breakup does not show in playback on the computer. I understand there is a file I need to delete and reboot the computer and imovie will rebuild the file in the program. Help!

    My method is to use the DAW in standard recording mode, and set up the camcorder entirely separately.  After recording, I automate the audio mix with fader moves and effects, then export ("bounce to disk") a full-fidelity AIFF, 16-bit 48 kHz stereo file (most videos use 48, not 44.1).  I use iMovie '11 to import the video from the camera, then import the stereo audio file and match it up to the camera audio by dragging it into the iMovie Project.  Make the waveforms visible, it's not too hard to align.
    Then, use iMovie's "Export as Quicktime" feature.  Here, by going through the menus and options, you can control the audio compression (for example, 256k instead of 128, although 128 seems to be enough for YouTube).
    AppleMan1958 posted a YouTube video about controlling iMovie's export options that may help:
    http://www.youtube.com/watch?feature=player_embedded&v=vJg-909lx2s#!

  • I am using using IDVD to create slide shows.  When viewed on my computer the pictures are clear and of high quality.  When I burn the slide show to a disk and play it back, the pictures are blurry and of poor quality.

    I am using IDVD to create slide shows.  When viewed on my computer, the pictures are clear and of high quality.  When I burn the slide show to a disk and play it back, the pictures are blury and of poor quality.  Is there a setting that controls the quality of the burn and if there is, where do I find it?  Thank you.

    The Mac software - iPhoto, iMovie, and iDVD are not the best with the Ken Burns effect (zoom in/out effect), so you might want to minimize that effect; also, if your subjects are wearing stripes for instance, that will have an effect if you zoom. There is better software available for slideshows; however, I do not know of any that is free (and does a good job). I've used Photo to Movie for some time; it does a fine job even in HD, but you have to pay for it. I use iDVD extensively, but only to add a menu, theme, special effects, etc. and then to burn it.

  • Process audio from mic and play it back. (What is wrong with my code?)

    Hi, I am trying to take the audio from the mic (at javasound://0), process it (add the JMF API sample plug in GainEffect.java) and then play the processed data source. The code I have so far is below.
    I am getting no errors - compiles fine - but nothing seems to be happening.
    The grand goal is to take the audio being captured from the mic and process it in real time using a plug in (not necessarily GainEffect) and also play it back (the processed audio) at the same time.
    Where am I going wrong? Thanks!
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioProcess {
         public static void main(String[] args){
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            MediaLocator dest = new MediaLocator("javasound://0");  //take sound captured directly from microphone
            try{             
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3);
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
         //add plug in effect
         try{
              Codec codec[] = {new  GainEffect()};
              audioTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e){
         pro.realize();
         while(pro.getState() != Processor.Realized);
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds);
         p.start();
    catch(NoPlayerException e){
         e.printStackTrace();
    } catch (IOException e) {
              e.printStackTrace();

    Ok, I narrowed my code down to this. There doesn't appear to be any infinite loops in the code now, but perhaps I'm wrong? The processor is realizing, and I am creating a player with the data source output from the processor, yet there still is nothing playing... which leads me to think that there is something wrong with my plug in implementation or my processor creation. Do you have any ideas or points in the right direction?
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioCapture {
         public static void main(String[] args){
              MediaLocator audioCapDevLoc = null;
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            try{
            MediaLocator dest = new MediaLocator("javasound://0"); //take signal from soundcard
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3); //register plug in
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){ //take the last plug in
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
    Codec codec[] = {new  GainEffect()}; //add plug in effect
         audioTrack.setCodecChain(codec);
         pro.realize();
         while(pro.getState() != Processor.Realized); //don't move on until realized
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds); //create a player using the data source from the processor
         p.start();
    catch (IOException e){
         e.printStackTrace();
    catch (CannotRealizeException e){
         e.printStackTrace();
    catch(NoPlayerException e){
         e.printStackTrace();
    catch(UnsupportedPlugInException e){
         e.printStackTrace();
    PS - sorry for the late reply.

  • How do I record an audio and send to a friend?

    Hi,
    I'm sure there is a much better forum on which to place this question, but is there a way I can record an audio on my iMac without a corded microphone and send it via email to someone or use it another way?
    A side note to that would be what might be an inexpensive corded mic to get?
    Thanks much,
    Lee
    P.S. I just began using Skype and will be wanting to purcahse a headset/mic
    to make calls: if anyone knows what might work good with a Mac that would
    be neat. Lots of questions. Total non-tech person here! Or... where would
    I post a question like this "PS" here on a support forum?

    Use GarageBand. I have made some sound files on just the internal mic of the MacBook Pro and the iMac has a similar one.
    Make a new project using the voice selection (delete the extra track -- it starts with male and female) and, once you get close to the mic input (test this to see how near you want to be), press the red record button.
    When you have finished, use the Share menu and send the file to disk. Once there you can attach the file to email easily. When exporting, select the mp3 format as that is universal.
    As to a microphone, if you use one that goes into the mic port, you will probably need an amplifier. A USB mic is going to be more expensive, but of good quality. It depends what you are going to need it for.

  • Recording 16 tracks and play movie on Macbook pro

    Hi
    Has anyone experience with recording 16 tracks 24 bits and play in the same time a movie on a new Macbook pro 2,16 on a secondary screen ?
    On my G5 it's no problem.
    Thanks
    G5 2.3 DC   Mac OS X (10.4.6)  

    Hmm... I do recall there was some kind of external USB2 video input device. I think it was from ATI though i may be mistaken. One of there All-In-Wonder devices.
    Regardless, such devices do exist, though they are likely only composite, S-Video, or F-Connecter based, and will likely have some form of latency issues.
    You may want to look around to see if there any form of ExpressCard capture devices. The ExpressCard slot is is capable up fill PCI Express speeds around 2.5Giga bits per second, so I suppose it does have sufficient bandwidth to capture say Component or HDMI video. Though I'm not sure if such a device even exists.

  • Recording separate audio and video to iMovie?

    I have been experimenting with recording video directly to iMovie with my DV camera instead of using a tape (saves time, as I'd have to import it anyway). I was wondering if there is any way I could record audio from a different source (I have a digidesign MBox) at the same time. This way, I'd have better audio quality and not have to worry about syncing it later. If this isn't possible in iMovie, is there a program that it is possible in (preferably not an expensive program)? Maybe Quicktime Pro can do this?
    Thanks.

    I like Bengt's suggestions. You could try experimenting by opening a second program and record the audio using both iMovie and the microphone input. Since you can mute the camcorder audio in iMovie after syncing, the last challenge is the sync. Seems like a clapboard would work.
    Otherwise, look into a video converter box or something where you can mix the audio and video externally, and have it come into iMovie over Firewire at the same time.
    Or, check over in the Final Cut forum to see about those capabilities.
    Portable hard disk recorders for pros could have separate video/audio inputs.
    Bengt's plugin mic is sounding pretty good about now.
    John

Maybe you are looking for

  • Using an External Hard Drive Question

    Sorry if this is such a green question but..... Can you play back music and movies from an external hard drive through Apple TV or do they have to be physically need to be on the Apple TV HD? Also, Is there a way to play what is "steaming" on a MBP t

  • Office for Mac 2008

    I need to be able to transfer data from a spreadsheet (not from my address book) to create address labels. I have not been able to do this in iWorks so I have been told to buy Office for Mac. I have purchased Office for Mac 2008 Home & Student editio

  • Premiere Elements 11 crashes while saving a video?

    My Adobe Premiere Elements 11 crashes when I try to save a simple video made up of still images to MPEG format (1080p, 29.97fps, Dolby audio) PC: Windows 7 Professional x64 Intel Core i3 2350m 6GB ram 500GB HDD Intel GMA HD3000

  • Change the agent dynamically

    Hi I am new to this Work flow and wanted to know it conceptually. I have a adobe form and when the submit button is pressed it should go to his approvers box. how do we do this. Submit button pressed ->control goes to backend class ->determine the ne

  • Selection in table with Master Column

    Hi, can anybody explain me how selection works in table with MasterColumn (TreeByNestingTableColumn)? I've created a table with several columns and the "master" one behaves differently from others. First of all, leaf elements of master column are not