Discussion Board

Results 1 to 5 of 5

Thread: WAV Sound.

  1. #1
    Registered User artblanc's Avatar
    Join Date
    Apr 2003
    Location
    Spain
    Posts
    7
    I have problems reproducing wav format on a 7650.

    It seems that the WAV file is played, but not very loud (i have to put my ear very close to the phone).

    The sound is well recorded. (quiet loud)

    Do I have to set something to make it louder?

    The code i'm using to play it is:

    Sound ss;
    byte[] data;
    int n = 0;

    InputStream is = this.getClass().getResourceAsStream("/sound/snd01.wav");

    try{
    // this is beacuse i use 2 bytes before the wav
    // that tell me the lenth in bytes of the sound
    n = is.read();
    n = n | is.read() << 8;
    data = new byte[n];
    is.read(data, 0, n);
    } catch(IOException e){}

    ss = new Sound(data, Sound.FORMAT_WAV);
    ss.setGain(255);
    ss.play(1);
    Last edited by artblanc; 2003-11-06 at 12:11.

  2. #2
    Registered User twiggja's Avatar
    Join Date
    Mar 2003
    Posts
    10
    I too have had this problem and there seems to be no pattern to it. 99% of my sounds play okay but every now and then I get one that just will not play (or as you say - you have to hold it right beside your ear to play it).

    The same sound and the same code will play on the 3650 but not on the 7650 (or N-Gage!).

    It's driving me nuts!

    J

  3. #3
    Registered User artblanc's Avatar
    Join Date
    Apr 2003
    Location
    Spain
    Posts
    7
    well, i have discovered somethig.
    It seems that the nokia 7650 makes some kind of fade out with the sound. Or at least it seems this.
    What i mean, is that i fixed the problem just adding 0.5 seconds of sound (empty) to my original sound.

    The problem was that the sound was so short that the possible fade out was all the sound.

    It seems it only happens on short sounds.

    Try it.

  4. #4
    Registered User twiggja's Avatar
    Join Date
    Mar 2003
    Posts
    10
    Thanks - that's explains a lot!

    J

  5. #5
    > It seems that the nokia 7650 makes some kind of fade out with the sound. Or at least it seems this.
    > What i mean, is that i fixed the problem just adding 0.5 seconds of sound (empty) to my original sound.

    Thank you for this valuable note!

    Can one disable this fade mechanism?
    My app plays sequences of one-second
    sounds.

    http://www.seeingwithsound.com/midlet.htm

    Peter Meijer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved