×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    4

    Nokia 6600 file path

    hi guys,

    i'm trying to build a prototype...to record and save the audio sound. but i've got a problem...

    my code:

    try {
    // Create a DataSource that captures live audio.
    Player p = Manager.createPlayer("capture://audio");
    p.realize();
    // Get the RecordControl, set the record location, and
    // start the Player and record for 5 seconds.
    RecordControl rc = (RecordControl)p.getControl("RecordControl");
    rc.setRecordLocation("file:/temp/record.wav");
    rc.startRecord();
    p.start();
    Thread.currentThread().sleep(5000);
    p.stop();
    rc.stopRecord();
    rc.commit();
    } catch (IOException ioe) {
    } catch (MediaException me) {
    Alert popup = new Alert("", me.getMessage(), null, AlertType.ERROR);
    popup.setTimeout(Alert.FOREVER);
    Display.getDisplay(this).setCurrent(popup);
    } catch (InterruptedException e) {
    }

    the problem is setRecordLocation is giving me an exception...wat is the real path of nokia 6600 that i can enter...

    thx a mil.

  2. #2
    Registered User
    Join Date
    Feb 2004
    Posts
    3
    u might want to try :: rc.setRecordLocation("file:audio.wav");

    =======

    there is a problem, it plays the sound u record almost immediately after starting to record...
    this is problem number one...

    another one is when i tried to store the stream in to RMS using the codes below:

    ByteArrayOutputStream output = new ByteArrayOutputStream();
    rc.setRecordStream(output);

    the WTK2.1 returns me

    Uncaught exception java/lang/OutOfMemoryError.

    plesae advise..

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    4

    Try this

    catch the exception...

    try including this 3 exception in ur try catch block....

    catch (IOException ioe) {
    } catch (MediaException me) {
    } catch (InterruptedException ie)

Posting Permissions

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