×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    2

    Unhappy How to increase buffer size of recorded audio?

    Hello there, I have multiple questions regarding my project and the question posted in the title is my top priority.

    I'm developing application for CLDC 1.0/MIDP 2.0 J2ME devices which supports multimedia recording and playback facilities. I'm testing my project in Sony Ericsson K790i and Sony Ericsson K530i.

    Here's short description of the project:

    The 2 mobile devices will communicate with each other going through server providing voice communication. I'm using Bluetooth, WiFi and GPRS for data transfer between client to server and server to client. Each data packet will be received at server for checking the validity and authenticity of the packet.
    So I'm performing following steps:
    1. From client application, login to the server.
    2. Select logged in user and perform talk operation with him.
    3. In talk form, I'm recoding the voice of the sender and sending that voice to the receiver.

    But the main problem is that its not allowing me to record voice of duration more than 700 Milliseconds. If I set it to 1 second or more, the mobile restarts as soon as start recoding the sound.

    Here's the code I'm using for recording the voice:

    Code:
    p = Manager.createPlayer("capture://audio?encoding=amr");
    p.realize();
    RecordControl rc = (RecordControl) p.getControl("RecordControl");
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    rc.setRecordStream(output);
    rc.startRecord();
    p.start();
    FriendTalk.nameTitle.setText("Recording...");
    Thread.sleep(700);
    FriendTalk.nameTitle.setText("Wait...");
    rc.stopRecord();
    rc.commit();
    p.stop();
    p.close();
    I'll ask questions one by one

    1. How RAM in J2ME works compared to normal computer?
    2. If memory of the phone is 25 MB on which I store the photos and applications, the same memory will be used as J2ME buffer?
    3. How to find out the maximum amount of available memory to the operating system and how much java can use?
    4. How much free memory j2me does have? Can I get more free memory?
    5. If phone has memory of 10 MB and java has memory of only 1 MB, is there any way to get more memory for java? Or is it possible to extend memory of java buffer or heap?
    6. If I delete the photos and applications on my phone memory and only keep my client j2me application on it, will that help me to give extra buffer using phone memory?
    7. Where can I get full list of devices supporting recording and playback of audio in J2ME?
    8. Where can I get list of audio encoding supported by those devices?
    9. Where can I get list of devices having large free java memory so that more data can be recorded?
    10. Is there any audio encoding format other than audio/amr which supports recording of audio in compressed format? Just like MP3 vs WAV in Windows.
    11. What is most generic audio format which can be played back in Nokia, Samsung and Sony Ericsson Mobiles?
    12. How can I find out if some audio encoding is supported in device without having that device?
    13. Which encoding is supported in Mobile Emulator?
    14. Can I add more mobiles to the emulator? If yes, how?
    15. I have already compressed my images, and done high obfuscating of my application and its size is now reduced from 450 KB to 180 KB. I'm using LWUIT libraries. Is my application size normal? Or should I get rid of images? Is my application using all the buffer or heap or memory that is supposed to be used by record control?

    I have so many more questions, but they're irrelevant if I get answers of the above questions. I don't want to scare you guys with more questions, because I think I already have scared you all.

    Sorry for my bad English. Sorry if its posted in wrong section.

    Any help is appreciated, and yes I searched a lot on google, but I couldn't find answers of these questions or its just that I don't know most of the terminologies used while searching. Kindly co-operate with me and help as much as possible.

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    2

    Re: How to increase buffer size of recorded audio?

    Please anyone can at least answer some of the mentioned questions. I really appreciate you looking into my thread.

  3. #3
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: How to increase buffer size of recorded audio?

    I'm sorry I don't have the time right now to answer all your questions, but I did notice many of the answers can be found by reading a J2ME book, looking on the net (google) or even better : using the Search funtionality on this forum...
    Also a very very good idea would be, if you are only targetting those two devices, to ask your questions in the SE forum, because even though both SE and Nokia run J2ME the implementations will be somewhat different, so you will have no guarantee that software written with Nokia users tips as a guideline will work correctly on a SE device...

Similar Threads

  1. How can I increase heap size on Nokia n95 8GB
    By sppp111 in forum Symbian
    Replies: 2
    Last Post: 2009-05-04, 09:02
  2. Problem in accessing audio buffer while Recording in 6600 and 7210
    By dham in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2009-04-24, 10:18
  3. APS Buffer Size ?
    By srivatsan.d in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2009-01-02, 07:05
  4. Audio PCM Frame Size Implications
    By tunelabguy in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2007-12-11, 21:13
  5. Replies: 6
    Last Post: 2005-10-03, 05:51

Posting Permissions

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