publish changes
This commit is contained in:
parent
afc5064a7b
commit
ac2c6ac843
1605 changed files with 3354 additions and 3354 deletions
|
@ -12,7 +12,7 @@
|
|||
#include "mpt/base/detect.hpp"
|
||||
#include "mpt/base/saturate_round.hpp"
|
||||
#include "mpt/osinfo/class.hpp"
|
||||
#include "mpt/osinfo/windows_version.hpp"
|
||||
#include "mpt/osinfo/arch_version.hpp"
|
||||
#include "mpt/string/types.hpp"
|
||||
#include "openmpt/base/FlagSet.hpp"
|
||||
#include "openmpt/base/Types.hpp"
|
||||
|
@ -28,7 +28,7 @@
|
|||
#include <cstdint>
|
||||
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
#if defined(MODPLUG_TRACKER)
|
||||
|
@ -308,10 +308,10 @@ struct SysInfo
|
|||
{
|
||||
public:
|
||||
mpt::osinfo::osclass SystemClass = mpt::osinfo::osclass::Unknown;
|
||||
mpt::osinfo::windows::Version WindowsVersion = mpt::osinfo::windows::Version::NoWindows();
|
||||
mpt::osinfo::arch::Version WindowsVersion = mpt::osinfo::arch::Version::NoWindows();
|
||||
bool IsWine = false;
|
||||
mpt::osinfo::osclass WineHostClass = mpt::osinfo::osclass::Unknown;
|
||||
mpt::osinfo::windows::wine::version WineVersion;
|
||||
mpt::osinfo::arch::wine::version WineVersion;
|
||||
|
||||
public:
|
||||
bool IsOriginal() const { return !IsWine; }
|
||||
|
@ -326,15 +326,15 @@ public:
|
|||
assert(SystemClass != mpt::osinfo::osclass::Windows);
|
||||
return;
|
||||
}
|
||||
SysInfo(mpt::osinfo::osclass systemClass, mpt::osinfo::windows::Version windowsVersion)
|
||||
SysInfo(mpt::osinfo::osclass systemClass, mpt::osinfo::arch::Version archVersion)
|
||||
: SystemClass(systemClass)
|
||||
, WindowsVersion(windowsVersion)
|
||||
, WindowsVersion(archVersion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SysInfo(mpt::osinfo::osclass systemClass, mpt::osinfo::windows::Version windowsVersion, bool isWine, mpt::osinfo::osclass wineHostClass, mpt::osinfo::windows::wine::version wineVersion)
|
||||
SysInfo(mpt::osinfo::osclass systemClass, mpt::osinfo::arch::Version archVersion, bool isWine, mpt::osinfo::osclass wineHostClass, mpt::osinfo::arch::wine::version wineVersion)
|
||||
: SystemClass(systemClass)
|
||||
, WindowsVersion(windowsVersion)
|
||||
, WindowsVersion(archVersion)
|
||||
, IsWine(isWine)
|
||||
, WineHostClass(wineHostClass)
|
||||
, WineVersion(wineVersion)
|
||||
|
@ -461,7 +461,7 @@ struct Flags
|
|||
// wide audio engine. It does not happen for exclusive mode WASAPI streams
|
||||
// or direct WaveRT (labeled WDM-KS in PortAudio) streams. As there is no
|
||||
// known way to disable this annoying behavior, avoid unclipped samples on
|
||||
// affected windows versions and clip them ourselves before handing them to
|
||||
// affected arch versions and clip them ourselves before handing them to
|
||||
// the APIs.
|
||||
bool WantsClippedOutput;
|
||||
Flags()
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <vector>
|
||||
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
|
||||
|
@ -86,10 +86,10 @@ static BOOL WINAPI DSEnumCallback(GUID *lpGuid, LPCTSTR lpstrDescription, LPCTST
|
|||
info.useNameAsIdentifier = false;
|
||||
// clang-format off
|
||||
info.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7) ? Info::Usability::Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::Win7) ? Info::Usability::Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
|
||||
Info::Level::Primary,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsWine() ? Info::Compatible::Yes : Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::OutputOnly,
|
||||
Info::Mixing::Software,
|
||||
Info::Implementor::OpenMPT
|
||||
|
@ -143,7 +143,7 @@ SoundDevice::Caps CDSoundDevice::InternalGetDeviceCaps()
|
|||
caps.HasNamedInputSources = false;
|
||||
caps.CanDriverPanel = false;
|
||||
caps.ExclusiveModeDescription = MPT_USTRING("Use primary buffer");
|
||||
caps.DefaultSettings.sampleFormat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista)) ? SampleFormat::Float32 : SampleFormat::Int16;
|
||||
caps.DefaultSettings.sampleFormat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista)) ? SampleFormat::Float32 : SampleFormat::Int16;
|
||||
IDirectSound *dummy = nullptr;
|
||||
IDirectSound *ds = nullptr;
|
||||
if(m_piDS)
|
||||
|
@ -220,7 +220,7 @@ SoundDevice::DynamicCaps CDSoundDevice::GetDeviceDynamicCaps(const std::vector<u
|
|||
}
|
||||
}
|
||||
}
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
// Vista
|
||||
caps.supportedSampleFormats = {SampleFormat::Float32};
|
||||
|
@ -362,7 +362,7 @@ bool CDSoundDevice::InternalOpen()
|
|||
}
|
||||
m_dwWritePos = 0xFFFFFFFF;
|
||||
SetWakeupInterval(std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond())));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,12 +250,12 @@ void Manager::ReEnumerate(bool firstRun)
|
|||
{ // Wine
|
||||
typeDefault[SoundDevice::TypePORTAUDIO_WASAPI].value = Info::DefaultFor::System;
|
||||
typeDefault[SoundDevice::TypeDSOUND].value = Info::DefaultFor::LowLevel;
|
||||
} else if(GetSysInfo().SystemClass == mpt::osinfo::osclass::Windows && GetSysInfo().WindowsVersion.IsBefore(mpt::osinfo::windows::Version::WinVista))
|
||||
} else if(GetSysInfo().SystemClass == mpt::osinfo::osclass::Windows && GetSysInfo().WindowsVersion.IsBefore(mpt::osinfo::arch::Version::WinVista))
|
||||
{ // WinXP
|
||||
typeDefault[SoundDevice::TypeWAVEOUT].value = Info::DefaultFor::System;
|
||||
typeDefault[SoundDevice::TypeASIO].value = Info::DefaultFor::ProAudio;
|
||||
typeDefault[SoundDevice::TypePORTAUDIO_WDMKS].value = Info::DefaultFor::LowLevel;
|
||||
} else if(GetSysInfo().SystemClass == mpt::osinfo::osclass::Windows && GetSysInfo().WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7))
|
||||
} else if(GetSysInfo().SystemClass == mpt::osinfo::osclass::Windows && GetSysInfo().WindowsVersion.IsBefore(mpt::osinfo::arch::Version::Win7))
|
||||
{ // Vista
|
||||
typeDefault[SoundDevice::TypeWAVEOUT].value = Info::DefaultFor::System;
|
||||
typeDefault[SoundDevice::TypeASIO].value = Info::DefaultFor::ProAudio;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <shellapi.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -189,10 +189,10 @@ bool CPortaudioDevice::InternalOpen()
|
|||
framesPerBuffer = paFramesPerBufferUnspecified; // let portaudio choose
|
||||
} else if(m_HostApiType == paMME)
|
||||
{
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista));
|
||||
} else if(m_HostApiType == paDirectSound)
|
||||
{
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista));
|
||||
} else
|
||||
{
|
||||
m_Flags.WantsClippedOutput = false;
|
||||
|
@ -219,7 +219,7 @@ bool CPortaudioDevice::InternalOpen()
|
|||
}
|
||||
} else
|
||||
{
|
||||
if(!GetSysInfo().IsWine && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::Win7))
|
||||
if(!GetSysInfo().IsWine && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::Win7))
|
||||
{ // retry with automatic stream format conversion (i.e. resampling)
|
||||
#if MPT_OS_WINDOWS
|
||||
m_WasapiStreamInfo.flags |= paWinWasapiAutoConvert;
|
||||
|
@ -452,7 +452,7 @@ SoundDevice::Caps CPortaudioDevice::InternalGetDeviceCaps()
|
|||
caps.DefaultSettings.sampleFormat = SampleFormat::Int32;
|
||||
} else if(m_HostApiType == paDirectSound)
|
||||
{
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.DefaultSettings.sampleFormat = SampleFormat::Float32;
|
||||
} else
|
||||
|
@ -464,7 +464,7 @@ SoundDevice::Caps CPortaudioDevice::InternalGetDeviceCaps()
|
|||
if(GetSysInfo().IsWine)
|
||||
{
|
||||
caps.DefaultSettings.sampleFormat = SampleFormat::Int16;
|
||||
} else if(GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
} else if(GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.DefaultSettings.sampleFormat = SampleFormat::Float32;
|
||||
} else
|
||||
|
@ -477,13 +477,13 @@ SoundDevice::Caps CPortaudioDevice::InternalGetDeviceCaps()
|
|||
}
|
||||
if(m_HostApiType == paDirectSound)
|
||||
{
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.HasInternalDither = false;
|
||||
}
|
||||
} else if(m_HostApiType == paMME)
|
||||
{
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.HasInternalDither = false;
|
||||
}
|
||||
|
@ -529,13 +529,13 @@ SoundDevice::DynamicCaps CPortaudioDevice::GetDeviceDynamicCaps(const std::vecto
|
|||
}
|
||||
if(m_HostApiType == paDirectSound)
|
||||
{
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.supportedSampleFormats = {SampleFormat::Float32};
|
||||
}
|
||||
} else if(m_HostApiType == paMME)
|
||||
{
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.supportedSampleFormats = {SampleFormat::Float32};
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ SoundDevice::DynamicCaps CPortaudioDevice::GetDeviceDynamicCaps(const std::vecto
|
|||
}
|
||||
#endif // MPT_OS_WINDOWS
|
||||
#if MPT_OS_WINDOWS
|
||||
if((m_HostApiType == paWASAPI) && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::Win7))
|
||||
if((m_HostApiType == paWASAPI) && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::Win7))
|
||||
{
|
||||
caps.supportedSampleRates = baseSampleRates;
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ bool CPortaudioDevice::OpenDriverSettings()
|
|||
{
|
||||
return false;
|
||||
}
|
||||
bool hasVista = GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista);
|
||||
bool hasVista = GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista);
|
||||
mpt::winstring controlEXE;
|
||||
TCHAR systemDir[MAX_PATH] = {};
|
||||
if(GetSystemDirectory(systemDir, mpt::saturate_cast<UINT>(std::size(systemDir))) > 0)
|
||||
|
@ -808,10 +808,10 @@ std::vector<SoundDevice::Info> CPortaudioDevice::EnumerateDevices(ILogger &logge
|
|||
result.apiName = MPT_USTRING("DirectSound");
|
||||
result.default_ = ((Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == static_cast<PaDeviceIndex>(dev)) ? Info::Default::Managed : Info::Default::None);
|
||||
result.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7) ? Info::Usability::Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::Win7) ? Info::Usability::Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
|
||||
Info::Level::Secondary,
|
||||
Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::FullDuplex,
|
||||
Info::Mixing::Software,
|
||||
Info::Implementor::External
|
||||
|
@ -821,10 +821,10 @@ std::vector<SoundDevice::Info> CPortaudioDevice::EnumerateDevices(ILogger &logge
|
|||
result.apiName = MPT_USTRING("MME");
|
||||
result.default_ = ((Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == static_cast<PaDeviceIndex>(dev)) ? Info::Default::Named : Info::Default::None);
|
||||
result.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7) ? Info::Usability::Usable : Info::Usability::Legacy : Info::Usability::NotAvailable,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::Win7) ? Info::Usability::Usable : Info::Usability::Legacy : Info::Usability::NotAvailable,
|
||||
Info::Level::Secondary,
|
||||
Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::FullDuplex,
|
||||
Info::Mixing::Software,
|
||||
Info::Implementor::External
|
||||
|
@ -889,20 +889,20 @@ std::vector<SoundDevice::Info> CPortaudioDevice::EnumerateDevices(ILogger &logge
|
|||
Info::Usability::Usable,
|
||||
Info::Level::Primary,
|
||||
Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::FullDuplex,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::WinVista) ? Info::Mixing::Hardware : Info::Mixing::Software,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::WinVista) ? Info::Mixing::Hardware : Info::Mixing::Software,
|
||||
Info::Implementor::External
|
||||
};
|
||||
break;
|
||||
case paWDMKS:
|
||||
result.apiName = sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? MPT_USTRING("WaveRT") : MPT_USTRING("WDM-KS");
|
||||
result.apiName = sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? MPT_USTRING("WaveRT") : MPT_USTRING("WDM-KS");
|
||||
result.default_ = ((Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == static_cast<PaDeviceIndex>(dev)) ? Info::Default::Named : Info::Default::None);
|
||||
result.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() ? sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::WinVista) ? Info::Usability::Usable : Info::Usability::Usable : Info::Usability::Broken : Info::Usability::NotAvailable,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() ? sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::WinVista) ? Info::Usability::Usable : Info::Usability::Usable : Info::Usability::Broken : Info::Usability::NotAvailable,
|
||||
Info::Level::Primary,
|
||||
Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() ? sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Native : Info::Api::Native : Info::Api::Emulated : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() ? sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Native : Info::Api::Native : Info::Api::Emulated : Info::Api::Emulated,
|
||||
Info::Io::FullDuplex,
|
||||
Info::Mixing::Hardware,
|
||||
Info::Implementor::External
|
||||
|
@ -927,10 +927,10 @@ std::vector<SoundDevice::Info> CPortaudioDevice::EnumerateDevices(ILogger &logge
|
|||
result.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ?
|
||||
sysInfo.IsWindowsOriginal() ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::Win7) ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::Win7) ?
|
||||
Info::Usability::Usable
|
||||
:
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ?
|
||||
Info::Usability::Experimental
|
||||
:
|
||||
Info::Usability::NotAvailable
|
||||
|
|
|
@ -282,7 +282,7 @@ bool CRtAudioDevice::InternalOpen()
|
|||
m_Flags.WantsClippedOutput = true;
|
||||
} else if(m_RtAudio->getCurrentApi() == RtAudio::Api::WINDOWS_DS)
|
||||
{
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista));
|
||||
}
|
||||
m_RtAudio->openStream((m_OutputStreamParameters.nChannels > 0) ? &m_OutputStreamParameters : nullptr, (m_InputStreamParameters.nChannels > 0) ? &m_InputStreamParameters : nullptr, SampleFormatToRtAudioFormat(m_Settings.sampleFormat), m_Settings.Samplerate, &m_FramesPerChunk, &RtAudioCallback, this, &m_StreamOptions, nullptr);
|
||||
} catch(const RtAudioError &e)
|
||||
|
@ -708,10 +708,10 @@ std::vector<SoundDevice::Info> CRtAudioDevice::EnumerateDevices(ILogger &logger,
|
|||
info.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ?
|
||||
sysInfo.IsWindowsOriginal() ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::Win7) ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::Win7) ?
|
||||
Info::Usability::Usable
|
||||
:
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ?
|
||||
sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ?
|
||||
Info::Usability::Experimental
|
||||
:
|
||||
Info::Usability::NotAvailable
|
||||
|
@ -747,7 +747,7 @@ std::vector<SoundDevice::Info> CRtAudioDevice::EnumerateDevices(ILogger &logger,
|
|||
Info::Usability::Broken, // sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::Windows::Version::Win7) ? Info::Usability:Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
|
||||
Info::Level::Secondary,
|
||||
Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::FullDuplex,
|
||||
Info::Mixing::Software,
|
||||
Info::Implementor::External
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <avrt.h>
|
||||
#endif
|
||||
#include <mmsystem.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
#if !MPT_OS_WINDOWS
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <mmreg.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <cstddef>
|
||||
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ SoundDevice::Caps CWaveDevice::InternalGetDeviceCaps()
|
|||
if(GetSysInfo().IsWine)
|
||||
{
|
||||
caps.DefaultSettings.sampleFormat = SampleFormat::Int16;
|
||||
} else if(GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
} else if(GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{
|
||||
caps.DefaultSettings.sampleFormat = SampleFormat::Float32;
|
||||
} else
|
||||
|
@ -126,7 +126,7 @@ SoundDevice::DynamicCaps CWaveDevice::GetDeviceDynamicCaps(const std::vector<uin
|
|||
{
|
||||
MPT_SOUNDDEV_TRACE_SCOPE();
|
||||
SoundDevice::DynamicCaps caps;
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
|
||||
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista))
|
||||
{ // emulated on WASAPI
|
||||
caps.supportedSampleFormats = {SampleFormat::Float32};
|
||||
caps.supportedExclusiveModeSampleFormats = {SampleFormat::Float32};
|
||||
|
@ -137,7 +137,7 @@ SoundDevice::DynamicCaps CWaveDevice::GetDeviceDynamicCaps(const std::vector<uin
|
|||
}
|
||||
if(GetDeviceIndex() > 0)
|
||||
{ // direct mode
|
||||
if((GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista)) || !GetSysInfo().IsOriginal())
|
||||
if((GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista)) || !GetSysInfo().IsOriginal())
|
||||
{ // emulated on WASAPI, or Wine
|
||||
WAVEOUTCAPS woc = {};
|
||||
caps.supportedExclusiveModeSampleFormats.clear();
|
||||
|
@ -293,7 +293,7 @@ bool CWaveDevice::InternalOpen()
|
|||
}
|
||||
SetWakeupEvent(m_ThreadWakeupEvent);
|
||||
SetWakeupInterval(m_nWaveBufferSize * 1.0 / m_Settings.GetBytesPerSecond());
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
|
||||
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -684,10 +684,10 @@ std::vector<SoundDevice::Info> CWaveDevice::EnumerateDevices(ILogger &logger, So
|
|||
info.default_ = ((index == 0) ? Info::Default::Managed : Info::Default::None);
|
||||
// clang-format off
|
||||
info.flags = {
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7) ? Info::Usability::Usable : Info::Usability::Legacy : Info::Usability::NotAvailable,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::arch::Version::Win7) ? Info::Usability::Usable : Info::Usability::Legacy : Info::Usability::NotAvailable,
|
||||
Info::Level::Primary,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsOriginal() ? Info::Compatible::Yes : Info::Compatible::No,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::arch::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
|
||||
Info::Io::OutputOnly,
|
||||
Info::Mixing::Software,
|
||||
Info::Implementor::OpenMPT
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#if MPT_OS_WINDOWS
|
||||
#include <MMSystem.h>
|
||||
#include <windows.h>
|
||||
#include <arch.h>
|
||||
#endif // MPT_OS_WINDOWS
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue