×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    Sound problems with 7650

    Hello all.

    I am developing a game for nokia phones, but when I try to play sounds using the Sound class I only get very short sounds (only a few milliseconds).
    In the emulator everything goes right but, in the real device, it doesnt work.
    I dont know if i am doing anything bad... there is an example:

    sound=new Sound(880,1000);
    // sound.setSoundListener(this);
    sound.setGain(255);
    sound.play(1);

    With this piece of code i only get a click sound, nevertheless in the emulator i hear a piano note.

    Has anyone the same problem? Has anyone resolved it?
    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Looks like your missing a call to init() after the Sound constructor. I don't think the 7650 plays sound properly without calling init():
    Code:
    sound=new Sound(880,1000);
    sound.init(880,1000);
    // sound.setSoundListener(this);
    sound.setGain(255);
    sound.play(1);

Posting Permissions

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