Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-20639

Implement support for audio data resampling (audio formats conversion)

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Unresolved
    • Major
    • None
    • Audio

    Description

      It's badly required to properly output the sound for a lot of apps/games which either don't support sound streaming with an audio format compatible with the audio miniport driver, or which support compatible format, but are configured to use unsupported format instead. In such a cases, they can't perform the proper audio streaming without the compatible (maximum supported) audio format calculation and the proper audio buffer resampling (conversion to that supported format). So, as result, they don't produce any sound when they should and hence are totally silent.
      For example, if the app tries to perform audio streaming with 96 KHz sample rate, 32 Bits Per Sample or 4+ output channels, but the audio miniport driver supports maximum 48 KHz, 16 BPS and 2 (stereo) channels (as it really is in the case with the drivers for old audio cards like Intel AC97, which is emulated in VirtualBox), it does not play the sound because an attempt to do that is rejected by the audio miniport driver, which is configured to support only formats range for which it declares the support. So when it validates requested format on audio device open and that does not match, it intendedly fails the request from the app. Hence it requires to 1) pass only the maximum supported format instead and 2) the immediate proper audio data conversion to that format, once the request succeeds. Only these two conditions allow to perform audio streaming with unsupported audio format initially requested.

      From what I've tested, the following software belong to such a type of apps:

      • AIMP 3-6 versions (when trying to play with > 48 Khz/ != 16 BPS/ != 2 channels).
      • MxplayMMC 3.25 (with the same condition as above).
      • XMplay 4.1 (with the same condition as above).
      • Mozilla Firefox 52.9.0 ESR (always uses IEEE Float audio format, so it can't play the sound at all without the proper resampling or native support for that format).
      • Basilisk 55 non-IA32 build (same as above).
      • Mypal 78.0.2 (same as above).
      • Pengupop (game from Rapps).
      • Hover 1.0 (game from rapps).
      • Stammina 2.5 (app from Rapps).
      • Pilots Brothers (old shareware game designed in early 2000s for old Windows versions/sound cards).
      • Kuzya: Magical Elixir (same as above).

      I'm pretty sure there are much more such software and games. Generally, such an apps consist from all old stuff released during 1995 - 2005, which was designed to work with old audio cards and Windows versions and doesn't support modern audio formats, and from the most modern stuff, which works only with modern audio formats and does not with anything older instead. It's clearly visible basing on the examples specified above.

      I'm glad to tell I'm currently working on it, almost finished my implementation and will send a new PR soon.

      Attachments

        Issue Links

          Activity

            People

              Oleg Dubinskij Oleg Dubinskiy
              Oleg Dubinskij Oleg Dubinskiy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: