You Are Here:

Community: Developer Discussion Boards

#1 Old Unhappy 6280 plays wav in j2me - 2007-04-11, 08:57

Join Date: Mar 2007
Posts: 6
gootsing
Offline
Registered User
How can I make it? I use "x-wav" and "wav" type, my application crashes:(
Reply With Quote

#2 Old Re: 6280 plays wav in j2me - 2007-04-11, 10:16

Join Date: Jun 2006
Posts: 2,323
Location: India
Send a message via MSN to kkrish Send a message via Yahoo to kkrish Send a message via Skype™ to kkrish
kkrish's Avatar
kkrish
Offline
Forum Nokia Champion
Quote:
Originally Posted by gootsing
How can I make it? I use "x-wav" and "wav" type, my application crashes:(

try using with the following mime type.

audio/wav
audio/x-wav

regards,
KKrish


=============================
Before to ask the question, Few things to be remind
1- Check wiki.forum.nokia
2- Forum.nokia.com, developer.symbian.org
3- Check on google
Reply With Quote

#3 Old Red face Re: 6280 plays wav in j2me - 2007-04-11, 10:40

Join Date: Mar 2007
Posts: 6
gootsing
Offline
Registered User
Thanks. I mean i used "audio/x-wav" and "audio/wav" and it crashed. Are the audio files not in proper format that 6280 supports (e.g., sample rate, bit rate and so on).
Reply With Quote

#4 Old Re: 6280 plays wav in j2me - 2007-04-11, 10:51

Join Date: Jun 2006
Posts: 2,323
Location: India
Send a message via MSN to kkrish Send a message via Yahoo to kkrish Send a message via Skype™ to kkrish
kkrish's Avatar
kkrish
Offline
Forum Nokia Champion
could you paste the code? you used to create the Player


=============================
Before to ask the question, Few things to be remind
1- Check wiki.forum.nokia
2- Forum.nokia.com, developer.symbian.org
3- Check on google
Reply With Quote

#5 Old Question Re: 6280 plays wav in j2me - 2007-04-11, 12:01

Join Date: Mar 2007
Posts: 6
gootsing
Offline
Registered User
Very simple, just as below:
...
if((m_sndtype&XWAV_SND)!=0)
sfxplayer[index] = Manager.createPlayer("".getClass().getResourceAsStream(filename), "audio/x-wav");
elseif((m_sndtype&WAV_SND)!=0)
sfxplayer[index] = Manager.createPlayer("".getClass().getResourceAsStream(filename), "audio/wav");
...
Reply With Quote

#6 Old Re: 6280 plays wav in j2me - 2007-04-11, 18:20

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
Both MIME types should work on 6280. Is the file in correct format? Is the file in the JAR file for sure?

Hartti
Reply With Quote

#7 Old Re: 6280 plays wav in j2me - 2007-04-12, 06:32

Join Date: Oct 2005
Posts: 50
gracyvk
Offline
Regular Contributor
Hi gootsing,

Can you please ensure that the inputstream returned by the code "".getClass().getResourceAsStream(filename) is not null. I suspect that the "".getClass() method call as it will return the String class.

Best Regards,
Gracy
Reply With Quote

#8 Old Re: 6280 plays wav in j2me - 2007-04-12, 11:25

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
Also would like to know whether you tried in the corresponding emulator? Are you getting any exceptions?

Regards
Gopal

__________________
MobiQuil.com
An initiative by Developers for Developers.
http://www.mobiquil.com - Alpha - Launched.
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
wav file to Byte[] array in J2ME (+playing it) norrissmith Mobile Java General 2 2008-01-29 20:56
How can the WAP browser communicate to J2ME application? hbfornies Mobile Java General 20 2007-03-02 17:32
6280 j2me camera application and incoming call... adigadish Mobile Java General 0 2006-10-18 15:51
Petition: ANyone able to make a simple Time-lapse function for 6270 / 6280 in j2me?? hjgabrielsen Mobile Java General 2 2006-04-18 22:28
J2ME Polish Version 1.0 RC6 enough Mobile Java General 1 2004-07-20 12:25

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