aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-23 18:23:24 -0800
committerChris Robinson <[email protected]>2014-11-23 18:23:24 -0800
commit033cf3dca952bb8348f2726a8a6d48a9bd62b8a0 (patch)
treea1855d3715811c466bfc868ca20d26b5078660aa /Alc
parent837b38b1664e5d36a652443f7ec6e6dc3e0c5f80 (diff)
Add a boolean to specify if a device is headphones
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index c893ca042..d4d3e3f5 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1964,7 +1964,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
}
else
{
- bool headphones = false;
+ bool headphones = device->IsHeadphones;
const char *mode;
int bs2blevel;
int usehrtf;
@@ -3279,6 +3279,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->FmtChans = DevFmtChannelsDefault;
device->FmtType = DevFmtTypeDefault;
device->Frequency = DEFAULT_OUTPUT_RATE;
+ device->IsHeadphones = AL_FALSE;
device->NumUpdates = 4;
device->UpdateSize = 1024;
@@ -3553,6 +3554,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
alcSetError(NULL, ALC_INVALID_ENUM);
return NULL;
}
+ device->IsHeadphones = AL_FALSE;
device->UpdateSize = samples;
device->NumUpdates = 1;
@@ -3735,6 +3737,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
device->Frequency = DEFAULT_OUTPUT_RATE;
device->FmtChans = DevFmtChannelsDefault;
device->FmtType = DevFmtTypeDefault;
+ device->IsHeadphones = AL_FALSE;
ConfigValueUInt(NULL, "sources", &device->MaxNoOfSources);
if(device->MaxNoOfSources == 0) device->MaxNoOfSources = 256;