×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    6

    Unhappy 6280 plays wav in j2me

    How can I make it? I use "x-wav" and "wav" type, my application crashes

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: 6280 plays wav in j2me

    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
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    6

    Red face Re: 6280 plays wav in j2me

    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).

  4. #4
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: 6280 plays wav in j2me

    could you paste the code? you used to create the Player
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  5. #5
    Registered User
    Join Date
    Mar 2007
    Posts
    6

    Question Re: 6280 plays wav in j2me

    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");
    ...

  6. #6
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: 6280 plays wav in j2me

    Both MIME types should work on 6280. Is the file in correct format? Is the file in the JAR file for sure?

    Hartti

  7. #7
    Regular Contributor
    Join Date
    Oct 2005
    Posts
    50

    Re: 6280 plays wav in j2me

    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

  8. #8
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: 6280 plays wav in j2me

    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.

Similar Threads

  1. wav file to Byte[] array in J2ME (+playing it)
    By norrissmith in forum Mobile Java General
    Replies: 3
    Last Post: 2011-04-16, 14:24
  2. How can the WAP browser communicate to J2ME application?
    By hbfornies in forum Mobile Java General
    Replies: 20
    Last Post: 2007-03-02, 17:32
  3. 6280 j2me camera application and incoming call...
    By adigadish in forum Mobile Java General
    Replies: 0
    Last Post: 2006-10-18, 14:51
  4. Replies: 2
    Last Post: 2006-04-18, 21:28
  5. J2ME Polish Version 1.0 RC6
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-20, 11:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×