You Are Here:

Community: Developer Discussion Boards

#1 Old Efficiency of playing sound - 2007-08-31, 13:34

Join Date: Feb 2007
Posts: 29
adamzieba
Offline
Registered User
Is there a reference describing the most efficient format to play sounds as and how to most efficiently play them with respect to memory management, taking into account how to deallocate memory. I noticed that the Player tends to cling onto resources.
Reply With Quote

#2 Old Re: Efficiency of playing sound - 2007-09-03, 12:40

Join Date: Aug 2006
Posts: 307
axs
Offline
Regular Contributor
If under the term "efficient" you mean high performances and low operating memory consumption, then the standard WAV format (with pure PCM samples) may be considered as the most efficient. However, the WAV format is an uncompressed one, so the persistent memory will be used unefficiently.

Many standard multimedia formats are supported on the operating system level, so the Java is only connecting developer's code with to the native multimedia modules of the mobile platform. This way Java's Player is not consuming any resources, but simply provides the standard API to the multimedia applications.
Reply With Quote

#3 Old Re: Efficiency of playing sound - 2007-09-03, 20:26

Join Date: Feb 2006
Posts: 523
Location: Brazil
Send a message via MSN to alb3530
alb3530
Offline
Super Contributor
if you don't want real songs (i.e. containing voices), you could consider using MID format.

But if you do, AMR may be OK.Quality isn't as good as a WAV, but It consumes lower amount of memory.


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: Efficiency of playing sound - 2007-11-02, 19:34

Join Date: Feb 2007
Posts: 29
adamzieba
Offline
Registered User
Well what i mean iss how is the best way to allocate and deallocate memory when playing a wav for example. Say i got 100 different sounds which need to be played quickly after another. Say they need to be played randomly through a thread. So I dont know which order to pre allocate them in.

Im having issues with too much memory being consumed (RAM) .
Reply With Quote

#5 Old Re: Efficiency of playing sound - 2007-11-15, 09:58

Join Date: Jul 2003
Posts: 46
rantalah
Offline
Registered User
Since you have 100 samples played randomly don't bother trying to keep old Players in PREFETCHED or REALIZED states when they've played their content (the first time).

In order to minimize memory usage and latency:
- prefetch new Player while the previous one is playing
- close the Player when it has finished playing
- consider AMR, MP3 or AAC instead of WAV to minimime the use of static memory
Reply With Quote

#6 Old Re: Efficiency of playing sound - 2007-11-15, 10:13

Join Date: Feb 2007
Posts: 29
adamzieba
Offline
Registered User
Thanks for the reply. I did basically what you said paying high attention to deallocating memory once done. The reponse time is a little slow, but not too bad.
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
Sound recording and playing sasa General Symbian C++ 0 2004-10-12 14:41
Problem on playing sound in emulator mhahn0106 Symbian Tools & SDKs 0 2004-01-12 07:00
strange problem playing Sound on 7650 Poldipold Mobile Java Media (Graphics & Sounds) 1 2003-07-11 14:12
Playing polyphonic sound on Series 30 and 40 shmoove Mobile Java Media (Graphics & Sounds) 2 2003-05-14 15:09
Playing wav sound with the nokia api yuvalgeva Mobile Java General 0 2002-12-18 13:50

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