summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c13
-rw-r--r--Alc/hrtf.c3
2 files changed, 9 insertions, 7 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 391cfe11..a7cb9e92 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1803,12 +1803,13 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
{
enum DevFmtChannels chans;
ALCuint freq;
-
- FindHrtfFormat(device, &chans, &freq);
- device->Frequency = freq;
- device->FmtChans = chans;
- device->Flags |= DEVICE_CHANNELS_REQUEST |
- DEVICE_FREQUENCY_REQUEST;
+ if(FindHrtfFormat(device, &chans, &freq))
+ {
+ device->Frequency = freq;
+ device->FmtChans = chans;
+ device->Flags |= DEVICE_CHANNELS_REQUEST |
+ DEVICE_FREQUENCY_REQUEST;
+ }
}
if(V0(device->Backend,reset)() == ALC_FALSE)
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 7f8ae4ce..8aa3718f 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -908,7 +908,7 @@ const struct Hrtf *GetHrtf(ALCdevice *device)
return NULL;
}
-void FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint *srate)
+ALCboolean FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint *srate)
{
const struct Hrtf *hrtf = &DefaultHrtf;
@@ -930,6 +930,7 @@ void FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint
*chans = DevFmtStereo;
*srate = hrtf->sampleRate;
+ return ALC_TRUE;
}
void FreeHrtfs(void)