×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    40

    Can't capture audio?

    I have tried:

    Manager.createPlayer("capture://audio");
    Manager.createPlayer("capture://wav");
    Manager.createPlayer("capture://x-wav");
    Manager.createPlayer("capture://x-wav?encoding=pcm&rate=11025&bits=16&channels=1");

    But all of them gave me MediaException on the simulaor.

    I am using S60_2nd_FP2_MIDP_SDK on Java 1.6 and WTK25.

    Can anyone tell me why I can't record audio?

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    40

    Re: Can't capture audio?

    Hi,

    Now I reinstall the latest S60_3rd_MIDP_SDK_FP1 plus Carbide.J and EClipse 3.3.

    createPlayer doesn't give me problem any more. But I get problem at setRecordLocation. I tried with URL for setRecordLocation:

    file:///c:/IDTTest.wav
    file:///d:/IDTTest.wav
    file:///e:/IDTTest.wav
    file:IDTTest.wav

    I run the midlet on the emulator since I don't have a phone yet. I also set following permissions:

    MIDlet-Permissions: javax.microedition.io.Connector.file.read, javax.microedition.io.Connector.file.write, javax.microedition.media.control.RecordControl

    But no matter what file name, no matter permission or not, I always get the same IOException.

    My code is like following:

    Player p = Manager.createPlayer("capture://audio");
    p.realize();
    RecordControl rc = (RecordControl)p.getControl("RecordControl");
    //rc.setRecordLocation("file:///e:/IDTTest.wav");
    rc.setRecordLocation("file:IDTTest.wav");
    rc.startRecord();
    p.start();
    Thread.currentThread().sleep(10000);
    rc.commit();
    p.close();


    Can anyone help me out?

  3. #3
    Registered User
    Join Date
    Feb 2006
    Location
    Brazil
    Posts
    523

    Re: Can't capture audio?

    have you tried changing the path of setRecordLocation to

    Code:
    file:///e:/sounds/digital/IDTTest.wav
    ?

    best regards
    Http_user_agent:
    NokiaN80-1/3.0 (4.0707.0.7)
    Series60/3.0
    Profile/MIDP-2.0
    Configuration/CLDC-1.1

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    40

    Re: Can't capture audio?

    Ok, now it works for path e:/Sounds/Digital/IDTTest.wav.

    But I need to create a 0 byte wav file at the place, otherwise it will give me File Not Exist IOException.

    If the path is c:/Nokia/Sounds/Digital/IDTTest.wav, it gives me a java.lang.SecurityException: Access denied.

    At least I have something workable.

    Many thanks to alb3530.

Similar Threads

  1. Audio Capture, last 3 seconds of audio chopped off
    By aztec30 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-09-15, 18:28
  2. Audio Capture
    By aztec30 in forum Mobile Java General
    Replies: 1
    Last Post: 2006-09-15, 02:16
  3. capture audio on S40 6101
    By lreyero in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-04-04, 18:09
  4. nokia 6600 audio capture problems
    By yuxl-bupt in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2005-12-21, 19:58
  5. Audio Capture in Java
    By larrydb in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2003-08-25, 15:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •