| Reply | « Previous Thread | Next Thread » |
|
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.
|
|
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. |
|
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 |
|
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) . |
|
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 |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| 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 |