| Reply | « Previous Thread | Next Thread » |
|
Hi there,
I wrote an app that is working well on over 55 series of 10 different cellphone manufacturers. But porting the app to series40 with 240x320 displays such as 6280 or 6288 causes great difficulties. The app freezes unpredictably every now and then during player changes. I already figured out that it has something to do with sound changing, because it works fine with sound turned off in my app. Then there is no loading, prefetching, realizing and so on. I know, that there can only be one player prefetched in series40 and explicitly check for that before creating and playing the next player! I should mention that the same file works perfect on the 6270 device (same series)!? but crashes without any error message or exception on 6280 and 6288, and with a MediaException: "device error" on 6233 that I catch stoping the player like this: player.stop(); while (player.getState() == Player.STARTED) { Thread.yield(); } player.close(); // for series 40 cannot have two players prefetched while(player.getState() != Player.CLOSED) { Thread.yield(); } player = null; Can anyone please tell me what could cause such an error. I'm very thankfull for the slightest hint! (excuse my bad english, I'm no native speaker) greets flo |
|
Hmm.. I've just had the same problem. Seems there's a bug in the implementation of the mmapi (once again I might add!). On the 6280, I had as you have a "Device error" exception (which is not a documented java exception I might add!) once I tried to start() a player that had been playing previously.
I start the players like this: Code:
player.realize(); player.prefetch(); player.start(); Code:
player.stop()
while(player.getState()==Player.STARTED) {
}
player.deallocate();
Code:
player.stop();
while(player.getState()==Player.STARTED) {
}
player.deallocate();
player.stop();
player.deallocate();
Cheers, Thomas Egeskov Petersen |
|
hi thomas,
thanx a lot for your reply. I had given up all hope for an answer and/or solution already... I've worked around the problem by reducing the amount of sounds in the app to such an extent that there is no player to stop for the next one. no solution at all, I know! unfortunately I have no time to check your solution. but I think it very likely to work! when the player won't deallocate, deallocate it once more, for sure. ; ) thank you very much! kind regards, flo |
|
No sweat.. Didn't ever see the problem on the 6280 before today, but then I hadn't looked closely enough. (I wonder how it passed testing!..).. Anyway, this is just another hack to add to the list of wonderfull hacks needed to make audio work. So much inconsistancy in the mmapi implementation on all handsets (and I don't just mean Nokia!). I think 90% of the bugs reported in my last project were related to sound.. And THAT sucks!
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME ); | zdenko | General Symbian C++ | 5 | 2006-12-08 02:03 |
| using Midi player for interactive app in 6230 - makes clicking sound | mks@megansmitley.org | Audio | 0 | 2006-01-10 16:56 |
| MediaException: cannot create player (while trying to play a midi) | njzk2 | Mobile Java Media (Graphics & Sounds) | 2 | 2005-03-21 14:42 |
| My app crashes when the call is in progress | michalpleban | Symbian User Interface | 0 | 2004-10-15 18:43 |
| including midi player | j2me_raj | Mobile Java General | 0 | 2003-07-23 06:45 |