Configuring Audio Capture

I am trying to sample the microphone using a recordStream. How do I control the rate, bits, unsigned, etc...
If I use:
p = Manager.createPlayer("capture://audio");
Under Ktools everything slows to a trickle and takes about 5 seconds to record 20 miiliseconds worth of data, then i get aboput 80,000 bytes of data that appears to be 16 bits
in the Manager class description
http://www.cs.kent.ac.uk/teaching/03/modules/CO/6/25/doc/LOC/MMA/javax/microedition/media/Manager.html
it says I can do things like:
Manager.createPlayer("capture://audio?bits=8");
When I do this I get a MediaException:
Cannot create a DataSource for: capture://audio?bits=8
How can I control the sample rate, # of bits etc...?
Thank You

You can try to use "capture://audio?encoding=pcm&rate=8000&bits=8&channels=1" if it can't work, means that your system doesn't support 8bit audio. You should down the program into real phone and try again. If you want to minimize the audio size, you should use "encoding=gsm", but some phone does't support gsm audio capture!

Similar Messages

  • DigiVox A/D - Cannot render audio capture

    Hello, i have DigiVOX A/D. I configured it and I can watch TV. But when I try to capture it, there is a "Cannot render audio capture" message. I tried a lot of parameters changes but nothing helped. Can you please help?
    Juso

    So I did some more testing. Now it works this way:
    I can watch TV and it works OK. When I click capture it doesn't work and it writes error message "Cannot render audio capture". I go to settings and setup to capture only audio. I try to capture. I do some more modifications. It still doesn't work. But on some point of configuration (I could't find exaxtly when) the sound stops during watching. And if I try to capture at that time, it captures OK with audio and video. It doesn't matter whether I use Mpeg 2 or Mpeg 4. Both works. So I think codecs are OK. And it works so (no audio during watching and good audio and video during capture) till I close the application. When I start it again, there is sound when watching and error when clicking capture button. And again I can do some settings modification (random) and after some config steps it start capture but stops audio while watching.

  • Audio capture problems

    I'll see if I can summarise this clearly and accurately.
    Client has material recorded onto DV tape. The audio was captured directly onto tape via an external mike connected to the camera.
    When played back on a tape deck or through my own camera, the audio is almost inaudible. However, when played back through the client's camera and heard through headphones, the audio is clear and distinct.
    When capturing the material from my DSR11, the FCP Audio Meters show levels to be normal (peaking at around -6dB), even though the audio is still virtually inaudible. After capture, however, the Audio Meters show the levels to be very low (around -40dB).
    This remains the case when the audio is captured directly from the client's camera (the sound can be heard normally through headphones connected to the camera - the camera's audio output level is set at the mid-point, it is not turned up - and shows at normal levels on FCP's Audio Meters, but the sound becomes very quiet and the levels on the Audio Meters drop back down after capture).
    The material has been captured on different tape stocks, and only about half of the tapes in the client's batch have problems - the rest are audible as normal.
    My tape deck and camera have been tested with other tapes and are working normally. FCP is configured to capture stereo through both channels.
    In short, everything is set up normally and in working order, but the problem persists.
    Has anyone any idea (a) what is wrong and (b) what to do about it? Please answer the second question first!
    Many thanks.

    Maybe the mic records to mono.
    Do you see two audio tracks in the Viewer and Timeline?
    Al

  • Merging and saving audio capture + file from disk

    Hi,
    I need to combine an audio file (read from disk) with an audio capture from a microphone and save the combined audio to a file.
    I created processors for both, merged the data sources and created a processor from the merged data source.
    If I use that as an input to a player, it seems to play OK : I hear the combination of the audio file and the microphone over the speakers (albeit with a delay of the microphone input).
    But when I try to save this merged processor's data source (I tried 2 different ways based on samples I found) I get the following exceptions respectively
    writeToFile
    javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.RawBufferMux$RawBufferDataSource@121cc40
         at javax.media.Manager.createDataSink(Manager.java:1894)
         at soundTest.MergeTest4.writeToFile(MergeTest4.java:108)
         at soundTest.MergeTest4.runTest(MergeTest4.java:70)
         at soundTest.MergeTest4.main(MergeTest4.java:207)
    writeToFile2:
    Unable to handle format: LINEAR, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    Unable to handle format: LINEAR, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 176400.0 frame rate, FrameSize=32 bits
    Failed to realize: com.sun.media.ProcessEngine@691f36
    Error: Unable to realize com.sun.media.ProcessEngine@691f36
    javax.media.CannotRealizeException
         at javax.media.Manager.blockingCall(Manager.java:2005)
         at javax.media.Manager.createRealizedProcessor(Manager.java:914)
         at soundTest.MergeTest4.saveFile(MergeTest4.java:83)
         at soundTest.MergeTest4.runTest(MergeTest4.java:71)
         at soundTest.MergeTest4.main(MergeTest4.java:208
    Here's the code (apologies for heavy use of static and poor error handling)
    public class MergeTest4 {
           private static final Format AUDIO_FORMAT = new AudioFormat(AudioFormat.LINEAR);
           private static final int TIME_OUT = 2000;
         private static void runTest() throws Exception {
           DataSource ds1 = getCaptureDataSource();
           DataSource ds2 = Manager.createDataSource(new URL("file:///c:/temp/test.wav"));
           Processor processor1 = Manager.createProcessor(ds1);          
           Processor processor2 = Manager.createProcessor(ds2);  
           configureAndStart(processor1);
           configureAndStart(processor2);
           DataSource[] sources = { processor1.getDataOutput(), processor2.getDataOutput()};
           DataSource mergedDS = Manager.createMergingDataSource(sources);
           Processor mergedProcessor = Manager.createProcessor(mergedDS);    
           configureAndStart(mergedProcessor);
            //This works
            Player player = Manager.createRealizedPlayer(mergedProcessor.getDataOutput());
             player.start();          
             //This does not work
             //  writeToFile(mergedProcessor);
             //  writeToFile2(mergedProcessor);
        private static void writeToFile2(Processor processor) throws Exception {
              ProcessorModel outputPM = new ProcessorModel(processor.getDataOutput(),
                    new Format[]{ new AudioFormat(AudioFormat.LINEAR)},
                    new FileTypeDescriptor(FileTypeDescriptor.WAVE)
            MediaLocator dest = new MediaLocator("file://./rec.wav");
            Processor outputProcessor = Manager.createRealizedProcessor(outputPM);
            DataSource newDS = outputProcessor.getDataOutput();
            newDS.connect();
            newDS.start();
            DataSink dataSink = Manager.createDataSink(newDS, dest);
            dataSink.open();
            dataSink.start();
          //  dataSink.addDataSinkListener(this);
            outputProcessor.start();
         private static void writeToFile(Processor processor) throws Exception {
              StateHelper sh = new StateHelper(processor);
              if (!sh.realize(10000)) {
                   System.exit(-1);
               processor.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.WAVE));
               MediaLocator dest = new MediaLocator("file://c:/temp/foo.wav");
               DataSink filewriter = Manager.createDataSink(processor.getDataOutput(), dest);
               filewriter.open();
               StreamWriterControl swc = (StreamWriterControl) processor.getControl("javax.media.control.StreamWriterControl");
               //set limit to 5MB
               if (swc != null) {
                   swc.setStreamSizeLimit(5000000);
               try {
                   filewriter.start();
               } catch (IOException e) {
                   System.exit(-1);
               // Capture for 20 seconds
               sh.playToEndOfMedia(20000);
               sh.close();
               filewriter.close();
         private static DataSource getCaptureDataSource() {
              try {
                   Vector captureDevices = CaptureDeviceManager.getDeviceList(AUDIO_FORMAT);
                    CaptureDeviceInfo audiocaptureDevice=null;
                    if (captureDevices.size() > 0) {
                         audiocaptureDevice = (CaptureDeviceInfo) captureDevices.get(0);
                    } else {
                         System.out.println("Can't find suitable audio capture device.");
                        return null;
                    return Manager.createDataSource(audiocaptureDevice.getLocator());
              } catch (Exception ex) {
                   ex.printStackTrace();
              return null;
         private static void start(Player player) {
              player.start();
              waitForState(player, Processor.Realized);
         private static void configure(Processor p) {
              p.configure();
              waitForState(p, Processor.Configured);
         private static void configureAndStart(Processor p) {
              p.configure();
              waitForState(p, Processor.Configured);
              start(p);
         private static void waitForState(Player player, int state) {
             if (player.getState() == state) {
                 return;
             long startTime = new Date().getTime();
             final Object waitListener = new Object();
             ControllerListener cl = new ControllerListener() {
                 @Override
                 public void controllerUpdate(ControllerEvent ce) {
                     synchronized (waitListener) {
                         waitListener.notifyAll();
             try {
                 player.addControllerListener(cl);
                 synchronized (waitListener) {
                     while (player.getState() != state && new Date().getTime() - startTime < TIME_OUT) {
                         try {
                             waitListener.wait(500);
                         } catch (InterruptedException ex) {
                             ex.printStackTrace();
             } finally {
                 player.removeControllerListener(cl);
         Any idea what needs to be changed for this to work?
    Thanks
    Philippe

    Drew
    Now that you've got as far as doing GUIs, you must learn to read the API. Here/s a link.
    Is it something like: out.textBox.text() ??
    Not quite. In fact, not at all. The syntax implies that out has a member textBox which in turn has a method text. That's pretty far removed from reality, isn't it?
    From the code you posted, you apparently know that out.println(...) takes a String parameter. Now go look up the API and find a method of JTextField that returns a String, that Returns the text contained in this TextComponent.
    ^Hint: it's a method inherited from JTextComponent^
    Get the text from the JTextField and pass it as a parameter to out.println. That's all there is to it.
    luck, db
    Blasted multiposter didn't have the decency to indicate here that the immediate problem was resolved, just went ahead and started a [new thread|http://forum.java.sun.com/thread.jspa?threadID=5282987].
    One for the little black book.
    Edited by: Darryl.Burke

  • Audio Capture from DV Tape

    I've reviewed many posts here about audio capture but, I am unable to figure out what the "trick" is to capturing audio alone with the video using the new iMovie. I'm connected via Firewire and I'm able to view the video in capture mode but, I hear no sound. I've checked iMovie Preferences and System Preferences and everything seems to be OK there.
    Is this the way this new version of this program functions? I wish I didn't have to post a msg here because, I'm trying to read the previous post and trying anything that seems to pertain to my issue without the desired results.
    Can someone please shed some light on what's going on with this function of this program?

    I assume you are wanting to hear the audio as you are importing and not that you have no audio once it is imported.
    imovie 08 doesn't play audio while importing. While you are using tape (that imports in real time) imovie now imports from a variety of different types of camera such as AVCHD (which isn't imported at real time. Therefore it is no longer logical to playback audio on import.

  • System Settings-Audio Capture

    In FCE, trying to capture VHS via DV converter box. The sound is not coming over. In system settings/scratch disk (internal hard drive) the audio capture is grayed out. Analog RCA composite video & stereo audio connectors in place. How do I get my sound?

    You can't get audio during capture as firewire has control.
    Use the audio from the play device if you need to hear what's happening. You will notice latency on the FCE capture window, that's normal as well.
    Al

  • Media Encoder not finding "audio capture device"

    Hi,
    Im using Adobe Flash Media Encoder with Dxtory for Twitch streaming, and at first it worked fine. Recorded both my mic and game audio perfectly. Then seemingly suddenly, I fired it up  and it wouldn't stream the game audio. It would my Mic, but thats it. I then unplugged the mic and it started saying I had no Audio Capture Device. I checked in Dxtory and its set up the same as it was when it was working. It picks up both the mic and speakers like it should. I have uninstalled this program multiple times, both 3.1 and 3.2 versions, and each time when I re-download it, it loads up the same profile I had before. So when I am uninstalling it, its not uninstalling everything for some reason. Even though the program is no where to be found after its uninstalled. I have downloaded xsplit, and it picks up the game audio and my mic. So its just this program. Anyone have any ideas? I cant seem to find anything online about this issue.
    Thanks!

    From where?  PP sequence?  PP bin?  PP Source Monitor?  Watch folder?

  • Audio Capture problem

    When Capturing from a DV device on to final cut express HD, only audio is "caught". When I checked the scratch bin the audio selection was disabled (like, the check-bow was dimmed and unable to be changed). I'd like to be able to capture audio without using the voiceover feature and having to completely match audio with video. Ya dig?
    Thank you (for at least reading this)!

    then why is FCE capturing video but not audio. all the settings are correct, the only thing i fan find wrong is the "audio capture" check box in sratch disk settings under system settings is nulled to where you can't do anything to it. So, unless it's normally like that, I'd say it has something to do with the way it captures audio.
    so, please tell me that has nothing to do with it so I can find another reason why it won't capture audio.
    Macbook Pro   Mac OS X (10.4.8)  

  • Audio capture

    I want to whether the cross-platform supports the audio capture?
    If not ,are there any methods to finish audio capture on handheld

    Hey DaddyPaycheck, the tape deck is actually one of those boombox/shelf stereo with cd carousel, and dual tape deck (5.1 speaker system). Audio was working just before I disconnected the speakers. I tried using the speaker output jacks, as well as another audio out, but neither one of them was putting out audio through my computer's speakers. The sound preference recognizes the iMic, but not the Pyro. But the apps I mentioned recognizes both. Selecting the iMic for output in the system preference doesn't work either. I see the bars moving, but I believe that's just random noise the iMic is picking up.
    So, by all intent and purpose, the set up I have should technically work?

  • Audio Capture only happens if its more than 5 seconds

    Hello,
    I'm writing a midlet that does audio capture on the LG CU500 phone. When I capture for 5 seconds or more, audio capture works as intended, however if I only record for under 5 seconds, it doesn't work. There is no timer. Would could be causing the problem?
    Thanks
    aztec30

    Here is a snippet of the code that i'm using. When playing back, if I record say 10 seconds, I only hear about 7 seconds of the recording. About 3 seconds are cut off at the end. If I record for say less than 4 seconds, nothing seems to be recorded, nothing plays back.
    To record I do the following
    try {
    if(player != null)
    player.stop();
    if(ctrl != null)
    ctrl.commit();
    player.deallocate();
    player.close();
    ThreadSleep(500);
    if (player==null) {
    player = Manager.createPlayer("capture://audio?encoding=audio/amr");
    player.realize();
    player.prefetch();
    player.addPlayerListener(playerListener);
    is = new ByteArrayOutputStream();
    ctrl = (RecordControl)player.getControl("RecordControl");
    ctrl.setRecordStream(is);
    ctrl.startRecord();
    player.start();
    } catch (Throwable e) {
    Once recording is stopped I do this
    try {
    player.stop();
    ctrl.commit();
    player.deallocate();
    player.close();
    Thread.sleep(500);
    if (is !=null) {
    playback= Manager.createPlayer(new ByteArrayInputStream(is.toByteArray()),
    "audio/amr");
    playback.addPlayerListener(playerListener);
    playback.start();
    } catch (Throwable e) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Audio capture lost after installing snow leopard

    Has anyone else had problems loosing their audio capture in Premiere cs4 after installing Snow Leopard?

    Just wondering, is that a plug-in for Premiere?
    Similar problem with After Effects maybe?...
    http://blogs.adobe.com/keyframes/2009/08/after_effects_and_snow_leopard.html

  • Audio capture support won"t install in CD spin doctoris there something I need to know?

    How do I install audio capture support? I/m getting an error message: The Installation Failed. Does anyone know of a solutioon?

    AFAIK, CD Spin Doctor requires Toast Titanium 9. The latest CE Spin Doctor that works with it is 5.0.4. Once you launch it, the first window that pops up is this.

  • Audio capture recording .mov - .m4a

    I accidentally saved an audio capture recording with QT without switching it to save as audio. It's now a .mov (saved as movie) instead of .m4a. How do I convert from the .mov to .m4a? Also, is there any way to make it save as audio (.m4a) by default?

    Ah, yes, that works! Thank you.
    A follow-up question: When audio capture is stopped, how can the client program find out when all the audio data has been written to a file on the server. The client needs to know this to perform subsequent operations on the audio file.

  • Audio capture scratch for iTunes import/48kHz convert

    Working in first FCE HD project. I want to import an additional music track from iTunes. Following the manual's instructions for converting iTunes files to 48 kHz for import, it says to "navigate to the project's audio media folder". In the external hard drive's doc folder it shows all the necessary folders there except Audio Capture Scratch ( which was default checked and unselectable in Settings prior to the initial video/audio capture of existing commercials, etc. from a deck).
    Apparently setting up this Audio Capture Scratch as a destination that shows in the FCE docs window must be done after the initial set-up. (?) If so, I can't find how to do it. According to what I've been reading, though, the Audio Capture Scratch should already be among the 7 folders (Capture scratch, Render files, Audio render files, etc.) but it's the only one missing. Is this even related? Can audio be imported directly to the project as opposed to the ext. drive?
    Question is... Should that in fact be the destination folder? Or do I need to create an "audio media folder" for this project? If so, how? I've not found anything in FCE Help or the Brenneis manual.
    Thanks for any help on what must be a basic conceptual hole in my limited mental model.

    You can import audio files into FCE from any location
    on any HD. The audio file itself could be in your
    iTunes music folder but if so, I suggest making a
    duplicate copy of the song file in some other folder
    (your choice, your location, your folder name) to
    minimize the risk of accidently messing up something
    in your iTunes music folder.
    You could even drag a copy of the file from the
    Finder into the FCE Browser. Once it's in the FCE
    Browser, you can drag the music file onto one of your
    audio tracks.
    The ideal format is AIFF, 16-bit, stereo, 48Khz.
    Truly thanks for that. But... In order to convert the iTunes file to the above, I have to go to the iTunes Pref. window and the folder location field, click the Change button and navigate to the "project's audio media folder"... But I don't have, can't find or don't know how to make that folder. So I can't specify the destination. I'd love to drag/drop, but the format won't be AIFF, 16 bit 48kHz.
    When I read the manuals instruction for importing directly from a CD, it also says to drag the files into my "project's audio media folder", so I'm back to the same problem. I guess I could try dragging from the CD directly to my browser, and I will, but even if that works for now, I need to understand what/where/how to create the audio media folder, as I fear I'm missing a basic understanding here.
    And why is there no Audio Capture Scratch folder showing in the FCE doc folder? Even if this unrelated and irrelevant, I'm still puzzled about that. I'd appreciate any clues here. Thanks again.

  • "Audio Capture Device not selected" message?  Help please!

    Howdy folks,
    I just got a new PC, Windows 7 OS, I've installed ManyCam and version 3.2 of FME and am looking to broadcast again.  I don't recall this issue with my old PC (XP OS, Broadcaster StudioPro virtual cam and FME 2.5).  I updated to 3.2 as suggested/recommended in previous posts, but I am getting a message telling me to "please select audio capture devise connected to your system."  What am I doing wrong or might there be something that I need to download that I missed?
    Any help you can give is greatly appreciated.  I truly loved using FME 2.5 but am doing like you suggest here.
    Peace,

    Hello -
    My problem was fixed by setting a recording devise in my "sound" menu.
    What I did was -
    1.  Open the sound menu from the control panel.
    2.  clicked on the recording tab.
    3.  Chose "Stereo Mix - Realtek High Definition Audio" as my default device.
    That solved it.  It was almost too simple.    Hope this helps you!

Maybe you are looking for