You Are Here:

Community: Developer Discussion Boards

#1 Old Why doesn't player realize on N73? - 2007-10-09, 11:41

Join Date: Oct 2007
Posts: 9
borje.granberg
Offline
Registered User
I'm developing a Midlet that should play a wave-file from a custom inputstream from a socket connection. The funny is that is working perfect in the emulator but in the real device (a N73) the programs halts on the p.realize() line. Does anyone know what is wrong?

---- code -----

sc = (SocketConnection)Connector.open("socket://" + server + ":" + port);
is = sc.openInputStream();
...

dis = new MediaInputStream(is);
...

p = Manager.createPlayer(dis, "audio/x-wav");
p.addPlayerListener(this);
p.realize(); // <--- stop here
p.prefetch();
p.start();
Reply With Quote

#2 Old Re: Why doesn't player realize on N73? - 2007-10-09, 21:52

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
What is the port number you are connecting to? Unsigned midlets are not allowed to create a socket connections to ports 80, 8080 and 443 (although a security exception error message should be shown...)

Hartti
Reply With Quote

#3 Old Re: Why doesn't player realize on N73? - 2007-10-09, 22:04

Join Date: Oct 2007
Posts: 9
borje.granberg
Offline
Registered User
I'm connecting på port 7554
Reply With Quote

#4 Old Re: Why doesn't player realize on N73? - 2007-10-10, 05:42

Join Date: Feb 2006
Posts: 689
soku123
Offline
Super Contributor
Hi,
have u tried out with a sample code which plays a file in N73.
Thanks
Soku
Reply With Quote

#5 Old Re: Why doesn't player realize on N73? - 2007-10-10, 11:12

Join Date: Oct 2007
Posts: 9
borje.granberg
Offline
Registered User
Yes I can play i file on the phone. I have also tried in an other application to play a file trough a custom inputstream. In the read() method I have added a sleep to simulate a slow network connection. On the emulator the file plays during load. This I can hear because the sound is stopping regularly. On the phone it seams like it waits til it has all the file in memory. It takes longer before the sound starts to play and when it does there are no silent breaks.
The reason for this is that the phone doesn't support progressive playback. But WHY does the phone play the (delayed) local file and not the network transported wav-file? The API says that read returns -1 when the end of the stream is reached. This doesn't happen. Why?
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
Create 3GP player with J2ME for Mobile dexxa05 Mobile Java Media (Graphics & Sounds) 53 2008-03-27 20:52
fullscreen ignored in n73 j2me player PeppeM2 Mobile Java Media (Graphics & Sounds) 1 2007-07-03 15:42

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X 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