Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    3

    Smile Can't play audio files on a nokia 6131.

    I'm doing a simple app for a nokia 6131 and i need to play some audio files, but i can't.
    The player method is the following one:

    Code:
    private void playMedia() throws Exception {
          try{
              InputStream is = getClass().getResourceAsStream("audio.wav");
              player = Manager.createPlayer(is, "audio/x-wav");  
              player.realize();
              player.setLoopCount(1);
              player.start();
          }
          catch(Exception e){
              System.out.println(e.toString());
          }
      }
    I get: java.microedition.media.Mediaexception: device error

    does anyone have any idea??

    Thanks

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Can't play audio files on a nokia 6131.

    Do you know exactly where the error is thrown ? As in have you tried to single-step through the code ?
    I'm not sure but it might be a memory issue, according to the device's specs (http://www.developer.nokia.com/Devic...ications/6131/) it does not have a lot of memory to work with, so I was wondering how big the audio.wav file is you have been trying to load ? You might want to try to load a small file (200~300kb) instead to begin with and see if your code is running...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  3. #3
    Registered User
    Join Date
    Dec 2012
    Posts
    3

    Re: Can't play audio files on a nokia 6131.

    The error is thrown when i call player.start() and i am trying to play small files but it doesn't work.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,809

    Re: Can't play audio files on a nokia 6131.

    It may be the format too. .wav is a container format, there can be strange things inside.
    What happens if you try some simple thing? For example if you are developing on Windows, some super-old .wav files are still there, like C:\Windows\Media\ding.wav

  5. #5
    Registered User
    Join Date
    Dec 2012
    Posts
    3

    Re: Can't play audio files on a nokia 6131.

    ok. ill try with those files first... But what i need to play is the name of some products, im developing an app for people that cant read food labels so im generating those files with online text-to-speech apps.

Similar Threads

  1. how to play audio files in Qt?
    By ishaan_kakar in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2011-08-09, 13:20
  2. Can we play audio/video files during audio recording in Symbian ++?
    By dharam.machra in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2011-05-03, 08:17
  3. Play audio files
    By pankaj gupta55 in forum Symbian
    Replies: 17
    Last Post: 2010-04-26, 09:30
  4. how to play audio files in WRT
    By rajanmr in forum Symbian
    Replies: 5
    Last Post: 2010-02-15, 10:50
  5. play audio files
    By khalandar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-07, 06:58

Posting Permissions

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