You Are Here:

Community: Developer Discussion Boards

#1 Old MobileMedia API general question - 2004-10-27, 17:59

Join Date: Mar 2003
Posts: 90
Location: Russia, Bryansk
xdimas
Offline
Regular Contributor
Does anybody have a good working example of using subj for playing MIDIs? I hove troubles with it %(

My app has some sounds loaded from MIDI files. I need to stop them sometimes before I play another ones. And after that some sounds stops to play at all - that is I don't hear them anymore all along the app's work. Please help.
Reply With Quote

#2 Old 2004-10-27, 18:02

Join Date: Mar 2003
Posts: 90
Location: Russia, Bryansk
xdimas
Offline
Regular Contributor
I use this code:

Player curSound=null;
boolean sound; // true if app uses sound

void startPlayer(Player p){
curSound=p;
try{
curSound.start();
}
catch (Exception e){};
}

public void playSound(Player p,boolean stop){
if (sound){
if (stop){
if (curSound!=null){
try{
curSound.stop();
}catch (Exception e){};
}
startPlayer(p);
}
else{
if (curSound!=null){
if (curSound.getState()!=Player.STARTED)
startPlayer(p);
}
else{
startPlayer(p);
}

}

}
}

playSound(somePLayer,true) is called if I want to stop current Player and playSound(somePLayer,false) if I do not want to stop it.

Is it somethong wrong with the code?
Reply With Quote

#3 Old 2004-10-28, 12:46

Join Date: Mar 2003
Posts: 90
Location: Russia, Bryansk
xdimas
Offline
Regular Contributor
I've found that no exception is thrown - the Player just stops playing and that's all %(
I've tried to setLoopCount(1) and setMediaTime(0) - nothing helps %(
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

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