×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    12

    Playing ott sounds on Series 40: volume gradually decreases

    When I play a long, looped sound (ott format) on the Nokia 3220, the volume gradually decreases until you can't hear it. Restarting the sound starts it back at normal volume, but the same problem occurs. I can play other short sounds that are not looped no problem, but I can't tell if their volume would also decrease since they are so short.

    I'm using the Nokia API. When I run the app on the Nokia 3300 Emulator, the sound plays fine and does not change in volume.

    Here is a snippet of how the sound is initialized, which seems to be pretty standard:
    Code:
    // ----- This code is in my initialization method -----
    
    Sound sound = new Sound(buffer, Sound.FORMAT_TONE);
    
    // buffer is the byte array loaded from the ott
    sound.init(buffer, Sound.FORMAT_TONE);
    sound.setGain(255);
    I do not think there is a problem with how the ott is formatted, since the notes do come out sounding right when I can hear it. Also, when I run the same app on a lower end phone (3100), there is no problem. Is there anything special I have to do for the 3220?

  2. #2
    Registered User
    Join Date
    May 2008
    Posts
    12

    Re: Playing ott sounds on Series 40: volume gradually decreases

    This problem has been resolved.

    Removing the following line of code
    Code:
    sound.setGain(255);
    will prevent the problem from occurring. I just assumed I should include it because of the MMAPI equivalent of setting the volume upon loading the sound, but I suppose it's not necessary here.

Similar Threads

  1. Playing .wav file in Series 60
    By fmhunter in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-02, 18:48
  2. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05
  3. Series 60 Concept SDK throws an unknown exception
    By sagee in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-02-27, 12:10
  4. Replies: 0
    Last Post: 2002-12-30, 12:55
  5. Does Nokia series 60 emulator support sounds?
    By maseal in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-03, 18:14

Posting Permissions

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