You Are Here:

Community: Developer Discussion Boards

#1 Old Can't capture audio? - 2007-08-28, 20:45

Join Date: Mar 2006
Posts: 40
haploidus
Offline
Registered User
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?
Reply With Quote

#2 Old Re: Can't capture audio? - 2007-08-30, 21:17

Join Date: Mar 2006
Posts: 40
haploidus
Offline
Registered User
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?
Reply With Quote

#3 Old Re: Can't capture audio? - 2007-08-31, 06:50

Join Date: Feb 2006
Posts: 523
Location: Brazil
Send a message via MSN to alb3530
alb3530
Offline
Super Contributor
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
Reply With Quote

#4 Old Re: Can't capture audio? - 2007-08-31, 16:31

Join Date: Mar 2006
Posts: 40
haploidus
Offline
Registered User
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.
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
Audio Capture, last 3 seconds of audio chopped off aztec30 Mobile Java Media (Graphics & Sounds) 6 2006-09-15 19:28
Audio Capture aztec30 Mobile Java General 1 2006-09-15 03:16
capture audio on S40 6101 lreyero Mobile Java Media (Graphics & Sounds) 2 2006-04-04 19:09
nokia 6600 audio capture problems yuxl-bupt Mobile Java Media (Graphics & Sounds) 6 2005-12-21 20:58
Audio Capture in Java larrydb Mobile Java Media (Graphics & Sounds) 4 2003-08-25 16:13

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X 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