Skip to content
This repository
Browse code

[WIN32][AE] fixed: samplerate can be at least 192kHz (probably more?)

  • Loading branch information...
commit 8a34571fed74738414f7a703840cf9309705e42e 1 parent 0431403
wsoltys authored
2  xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
@@ -606,7 +606,7 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo
606 606
       deviceInfo.m_channels = layoutsByChCount[std::min(smpwfxex->nChannels, (WORD) 8)];
607 607
       deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_FLOAT));
608 608
       deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3));
609  
-      deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 96000));
  609
+      deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 192000));
610 610
     }
611 611
     else
612 612
     {

7 notes on commit 8a34571

Karlson2k
Collaborator

@wsoltys 192kHz with some (buggy?) drivers could cause many problems, so it's limited to safe value of 96kHz.

wsoltys
Collaborator

The standard format of my analog speakers was set to 24Bit, 48000Hz although it seems to be capable of 192kHz. So why not let the user decide if he wants higher rates rather than limiting it? But I'm still open for suggestions.
It seems to be that in Eden we didn't limited it at all. Also I dunno what AE makes out of it. Is the sample regardless of its source sample rate upsampled or does this just indicate that the device could render sample rates up to xxxHz (I would assume latter)?

Karlson2k
Collaborator

Starting from Vista everything is resampled to basic format (can be set up in Windows Control Panel). Except exclusive mode, which is used in XBMC starting from Frodo.
192 kHz with DirectSound problems is mostly related to WinXP. But it can totally hang computer or call BSOD.
@DDDamian, your word?

wsoltys
Collaborator

I thought we only use exclusive mode in Wasapi and DirectSound is still shared?

Karlson2k
Collaborator

That's right. But DirectSound allow to set sampling rate to higher value even on XP and on Vista+.

Damian Huckle
Collaborator

The initial thought there was to limit it (those looking for high quality are not generally using DS, and 96kHz is still extremely high quality) but I'm not really opposed to the change.

DS will downsample it to the Windows settings regardless, so if someone changes them to 192kHz and crashes it was deliberately done. For those few who do have 192kHz audio files why limit it in XBMC if they purposefully allow it in Windows setup?

Karlson2k
Collaborator

In the era of WinXP those settings was directly applied to hardware. And many apps was limiting DS to 96kHz. Including RMAA, bass lib...
Possibly drivers was broken, possible other reasons. And I don't know, was it fixed or not.
There are some users on XP, many with older hardware. We can leave this change as is and wait for any complains.

Please sign in to comment.
Something went wrong with that request. Please try again.