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

waveOutMessage does not return preferred audio device from Wave Mapper

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Wine
    • None

    Description

      The following code returns -1 to dwWaveOutDeviceID when on Windows it actually returns the preferred audio device. Reproduces on commit 28373a9.

      #include <cstdio>
      #include <windows.h>
      #include <mmsystem.h>
       
      int main(int argc, char** argv[]) {
          WCHAR pszWinMMErrText[MAXERRORLENGTH] = {0};
          DWORD dwWaveOutDeviceID;
          DWORD dw2;
       
          MMRESULT mmres = waveOutMessage((HWAVEOUT)WAVE_MAPPER, 0x2000 + 21, (DWORD_PTR)&dwWaveOutDeviceID, (DWORD_PTR)&dw2);
          if (mmres != MMSYSERR_NOERROR)
          {
              waveOutGetErrorTextW(mmres, pszWinMMErrText, _countof(pszWinMMErrText));
              printf("waveOutMessage failed: %lu (%S)\n", mmres, pszWinMMErrText);
          }
       
          if (dwWaveOutDeviceID == -1)
          {
              printf("No default output device was assigned, falling back to the first device\n");
          }
          return 0;
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            SigmaTel71 SigmaTel71
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: