You Are Here:

Community: Developer Discussion Boards

#1 Old Unhappy Unlimited Audio Recording with J2ME on nokia 6630 - 2006-02-04, 07:58

Join Date: Feb 2006
Posts: 3
basitj
Offline
Registered User
Well, I'm recording audio on my nokia 6630. This works great on the default color emulator, but behaves wierd on the real fone....

On my nokia 6630, it starts recording and records well if i record something like one minute of audio.

But if i go for recording larger files, either the software crashes, or the phone restarts. Some times it says Memory Full....

You can see my code, im trying to set the stream so that the data goes in to the file right away.... so there's no need to keep this in the memory...

Can you please help??? The code is as follows:


========================================
For starting to record
========================================
p = Manager.createPlayer("capture://audio");
p.realize();


rc = (RecordControl)p.getControl("RecordControl");



String file = "somefilename.wav"
fc = (FileConnection) Connector.open(file);



if(!fc.exists())
{
fc.create();

}


rc.setRecordStream( fc.openOutputStream());
rc.setRecordSizeLimit( Integer.MAX_VALUE );
rc.startRecord();
p.start();


========================================
Stop recording
========================================

p.stop();

rc.commit();
p.close();
screen.message="Player Stopped";

fc.close();
fc = null;
Reply With Quote

#2 Old Unhappy Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-05-11, 16:17

Join Date: Mar 2006
Posts: 9
latho
Offline
Registered User
Hi basitj,
have you found a solution for your problem ?
My app on 6630 stops recording always at file size = 127 Kb.

Latho
Reply With Quote

#3 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-05-11, 16:21

Join Date: Mar 2006
Posts: 9
latho
Offline
Registered User
Ok, I found out. It has to do with recordsizeLimit.

But I have another problem. If I create Player and starts playing,
I can't hear anything.
Reply With Quote

#4 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-05-12, 02:28

Join Date: Mar 2006
Posts: 65
brokendove
Offline
Regular Contributor
Quote:
Originally Posted by latho
Ok, I found out. It has to do with recordsizeLimit.

But I have another problem. If I create Player and starts playing,
I can't hear anything.
Do you get any errors? You are pointing to the right file that was created. Check the paths etc.

HTH,
Vikram Goyal,
Pro Java ME Mobile Media API (MMAPI) is now available http://www.mmapibook.com
Reply With Quote

#5 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-05-12, 07:09

Join Date: Feb 2006
Posts: 689
soku123
Offline
Super Contributor
Hi basitj,
If you are writing to the phones filesystem,the recorded sound, then you will have a look at the memory.also the recordplayer will implicitly call Commit whenever
Record size limit is reached
If the requested size is less than the already recorded size
No more space is available.

please check if the recording is done correctly if u give a specified byte as RecordSize.


Thanks
Soku
Reply With Quote

#6 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-05-12, 09:03

Join Date: Mar 2006
Posts: 9
latho
Offline
Registered User
My recordplayer always saves the audio data after record stop (after commit call) to file. That takes long and it's unsuitable for me.

Has anybody an idea how to bring the player writing continuously to storage card.

Latho
Last edited by latho : 2006-05-12 at 15:07.
Reply With Quote

#7 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2006-11-22, 23:24

Join Date: Nov 2006
Posts: 1
venukatik
Offline
Registered User
Hi basitj/latho,

I am having same problem as you guys posted. did you make any progress ?
Reply With Quote

#8 Old Talking Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2007-02-17, 16:29

Join Date: Nov 2004
Posts: 24
Location: Rome (Italy)
a.dionisi
Offline
Registered User
I tried with this:

RecordControl rc = (RecordControl)p.getControl("RecordControl");
FileConnection fconn = (FileConnection) Connector.open(file, Connector.WRITE);
if(fconn.exists())
fconn.delete();
fconn.create();
OutputStream out = fconn.openOutputStream();
rc.setRecordStream(out);
rc.setRecordSizeLimit(Integer.MAX_VALUE);
rc.startRecord();
p.start();
messageItem.setText("recording...");
Thread.sleep(5000); // record for 5 seconds
messageItem.setText("done!");
rc.commit();
p.close();
out.close();
fconn.close();

but sometimes I have problems with memory I think (phone restarts) and I don't know why.
Reply With Quote

#9 Old Unhappy Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2007-05-10, 13:14

Join Date: Feb 2006
Posts: 3
basitj
Offline
Registered User
I have not been able to solve the original problem and given up.

Now I'v also changed the set and got one with lots of RAM :)

N70 and N72 have lots of ram that is 32 mb, takes some time to fill, but the original problem stays there.
Reply With Quote

#10 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2008-06-01, 18:56

Join Date: Apr 2008
Posts: 14
irkara
Offline
Registered User
try{
player = Manager.createPlayer("capture://audio");
player.realize();
RecordControl rc = (RecordControl)player.getControl("RecordControl");

String file = "file:///resim.wav";
FileConnection fc = (FileConnection) Connector.open(file, Connector.WRITE);
if(!fc.exists())
{
fc.create();
}


rc.setRecordStream( fc.openOutputStream());
rc.setRecordSizeLimit( Integer.MAX_VALUE );
rc.startRecord();
player.start();}
catch(Exception e){System.out.println(e.toString());}

hi everybody, i am now trying to record audio, as you said above, i used this code for recording. but FileConnection fc = (FileConnection) Connector.open(file, Connector.WRITE); this code wants url? if i give the url, it wont work on my mobile. what can i do to solve this problem?
Reply With Quote

#11 Old Re: Unlimited Audio Recording with J2ME on nokia 6630 - 2008-06-01, 19:16

Join Date: Apr 2008
Posts: 14
irkara
Offline
Registered User
and also when i give the url, it asks me "is it ok to record?" i choose yes, but then it locks. what can i do? please help, thanx
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Nokia 6600 will not support audio recording with MMAPI? Mito1982 Mobile Java Media (Graphics & Sounds) 6 2006-03-09 02:56
which phones for laptop dvdljns PC Suite API and PC Connectivity SDK 2 2006-02-14 13:58
problem of LIVE audio streaming on nokia 6630 nilgosavi Mobile Java Media (Graphics & Sounds) 3 2005-11-11 06:45
Infra-red capability Symbian_Challenge_0412 General Discussion 1 2005-08-16 19:24
The big frustration on Nokia 6230 about audio and video!!! spawn6578 Audio 0 2004-07-11 14:07

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ