#145 Improved detection of supported audio file formats

closed-accepted
nobody
None
5
2011-05-26
2011-05-26
Alexey
No

This patch improve detection of audio files formats, supported by Java in mobile device.
It's re-sort pre-configured formats ('useSounds=arm,wav,mp3' in '.properties' file) to match 'supported content types' sorting, returned from Java 'javax.microedition.media.Manager.getSupportedContentTypes()' function.
If 'getSupportedContentTypes()' return formats in order 'wav,amr,mp3', midlet will try to use '.WAV', then '.AMR', and then '.MP3' formats.

Also this patch increase number of supported audio file formats from 2 to 10 variants. Without patch midlet accept from '.properties' file only two variants of audio format: 'useSounds=wav,arm', or 'useSounds=wav,mp3', or 'useSounds=amr,mp3'. If user specify 'useSounds=arm,wav,mp3', midlet try to play 'sound.arm' and 'sound.wav,mp3', what's not possible and not correct. Patch fixes this issue, and 'useSounds=arm,wav,mp3' will be processed correctly.

[Excuse me for my bad Inglish]

Discussion

  • Alexey
    Alexey
    2011-05-26

  • Jyrki Kuoppala
    Jyrki Kuoppala
    2011-05-26

    Thanks, committed.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2011-05-26

    • status: open --> closed-accepted