You Are Here:

Community: Developer Discussion Boards

#1 Old Midi using MMAPI - 2003-09-26, 19:41

Join Date: Mar 2003
Posts: 18
mauricesibrandi
Offline
Registered User
Hi,

I took me about a day to get some midi out of the speakers, but I managed it. I used a couple samples found here and in Nokia paper, tried different midi's, disabled obfuscators, etc.

What the problem was that the call prefetch caused a exception (no message whatsoever). The problem disolved when I removed the close call on the Input stream so now my code looks like this:

InputStream in = getClass().getResourceAsStream("/telewarp.mid");
Player player = Manager.createPlayer(in, "audio/midi");
player.realize();
//in.close();
player.prefetch();
player.start();

Notice the // in front of the close :)

Why is this? Is realize a async call? And who closes the InputStream now?

Maurice
Reply With Quote

#2 Old 2003-10-08, 13:47

Join Date: Mar 2003
Posts: 201
Location: Tampere / Finland
wangkui35
Offline
Regular Contributor
Hello,

You may try to first close the the input stream then realize the player. I couldn't say the reason of it but the aforementioned way does work in my code without throwing any exception.

Regards,
Kui
Reply With Quote

#3 Old 2003-10-08, 15:38

Join Date: Mar 2003
Posts: 18
mauricesibrandi
Offline
Registered User
In my previous attempts I had the in.close statement before the realize statement, but that didn't work also, but I will give it another try.

Maurice
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