×

Discussion Board

Results 1 to 3 of 3

Hybrid View

  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

    Playing polyphonic sound on Series 30 and 40

    Hi.
    I am trying to play a polyphonic sound on Series 30 and 40 phones.
    I load each instrument (converted to OTT from a MIDI file using Nokia's Sound Conversion tool) into a separate Sound object. I want to play these sounds simultaneously as they are all part of the same MIDI song, but on both emulator (3510i and Series 40 Concept), i get that the concurrent sound count is only 1, and truly only the last played sound is heard.
    Does this mean that I can't play polyphonic sounds using the Nokia Sound API or am I doing something wrong.
    Code:
    byte[][] instruments = {.....}
    // ..
          for (int i = 0; i < 6; i++) {
            s[i] = new Sound(instruments[i],Sound.FORMAT_TONE);
            s[i].init(instruments[i],Sound.FORMAT_TONE);
          }
          for (int i = 0; i < Sound.getConcurrentSoundCount(Sound.FORMAT_TONE); i++) {
            // only s[0] is being played because Sound.getConcurrentSoundCount(Sound.FORMAT_TONE) returns 1
            s[i].play(1);
          }

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    9
    According to the docs, you cannot play more than one sound:

    "Returns 1 if only one sound can be played at a time."

    Sala

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere / Finland
    Posts
    201
    That's true, you can't play several sounds simultaneously in Nokia series 30 or 40 phones by nokia UI API.

Posting Permissions

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