winmm: Added a FIXME for truncated device names.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 06 Aug 2016 23:05:02 -0400
changeset 102670abfef2f7fc5
parent 10266 7c430819edd2
child 10268 a3faa23abdbb
winmm: Added a FIXME for truncated device names.
src/audio/winmm/SDL_winmm.c
     1.1 --- a/src/audio/winmm/SDL_winmm.c	Sat Aug 06 19:34:32 2016 -0400
     1.2 +++ b/src/audio/winmm/SDL_winmm.c	Sat Aug 06 23:05:02 2016 -0400
     1.3 @@ -37,6 +37,21 @@
     1.4  #define WAVE_FORMAT_IEEE_FLOAT 0x0003
     1.5  #endif
     1.6  
     1.7 +/* !!! FIXME:
     1.8 +
     1.9 +WAVExxxCAPS gives you 31 bytes for the device name, and just truncates if it's
    1.10 +longer. However, since WinXP, you can use the WAVExxxCAPS2 structure, which
    1.11 +will give you a name GUID. The full name is in the Windows Registry under
    1.12 +that GUID, located here: HKLM\System\CurrentControlSet\Control\MediaCategories
    1.13 +
    1.14 +Note that drivers can report GUID_NULL for the name GUID, in which case,
    1.15 +Windows makes a best effort to fill in those 31 bytes in the usual place.
    1.16 +This info summarized from MSDN:
    1.17 +
    1.18 +http://web.archive.org/web/20131027093034/http://msdn.microsoft.com/en-us/library/windows/hardware/ff536382(v=vs.85).aspx
    1.19 +
    1.20 +*/
    1.21 +
    1.22  #define DETECT_DEV_IMPL(iscap, typ, capstyp) \
    1.23  static void DetectWave##typ##Devs(void) { \
    1.24      const UINT iscapture = iscap ? 1 : 0; \