You Are Here:

Community: Developer Discussion Boards

#1 Old Problem in accessing audio buffer while Recording in 6600 and 7210 - 2009-04-24, 11:18

Join Date: Jun 2008
Posts: 6
dham
Offline
Registered User
Hi,
I am trying to process audio while recording through the microphone. For processing I get the recorded data from the outputstream every 10 seconds and reset the buffer afterwards. This works fine with Nokia5310 and 5610 and I get a continuous stream of audio. This is part of the code I use to test whether accessing buffer is supported.

I start recording using this,
try
{
player = Manager.createPlayer("capture://audio");
player.realize();
player.prefetch();
rc = (RecordControl) _p.getControl("RecordControl");
output = new ByteArrayOutputStream();
rc.setRecordStream(output);

rc.startRecord();
player.start();

return true;
} catch (Exception e)
{
//_p.close();
return false;
}


Then using a TimerTask I get copy the audio into a byte array and check the size of it.

class bufferTimerTask extends TimerTask {

public void run() {
try
{

byte[] buffer = _output.toByteArray();
if (buffer.length > 0)
{

_observer.bufferData(" "+buffer.length);

_output.reset();


} else
{
_observer.bufferData("FAIL");
}

} catch (Exception ex)
{
ex.printStackTrace();
}
}
}

I tested this on 4 Series 40 5th edition FP1 devices. Though this works in 5310 and 5610. 6600 and 7210 allowed only to get 6 bytes of data initially and the buffer size was 0 afterwards.

Can somebody please help me to get this problem resolved.

Dham
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
6600 image problem ralabate Mobile Java Media (Graphics & Sounds) 2 2004-07-28 20:42

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