| Reply | « Previous Thread | Next Thread » |
|
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; |
|
Hi basitj,
have you found a solution for your problem ? My app on 6630 stops recording always at file size = 127 Kb. 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. |
|
Quote:
HTH, Vikram Goyal, Pro Java ME Mobile Media API (MMAPI) is now available http://www.mmapibook.com |
| brokendove |
| View Public Profile |
| Find all posts by brokendove |
|
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 |
|
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.
|
|
Hi basitj/latho,
I am having same problem as you guys posted. did you make any progress ? |
|
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. |
|
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. |
|
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? |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| 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 |