Add a return value to FindHrtfFormat
This commit is contained in:
parent
ef8002a832
commit
9f43de62ab
13
Alc/ALc.c
13
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)
|
||||
|
@ -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)
|
||||
|
@ -799,7 +799,7 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans);
|
||||
#define HRTFDELAY_FRACONE (1<<HRTFDELAY_BITS)
|
||||
#define HRTFDELAY_MASK (HRTFDELAY_FRACONE-1)
|
||||
const struct Hrtf *GetHrtf(ALCdevice *device);
|
||||
void FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint *srate);
|
||||
ALCboolean FindHrtfFormat(const ALCdevice *device, enum DevFmtChannels *chans, ALCuint *srate);
|
||||
void FreeHrtfs(void);
|
||||
ALuint GetHrtfIrSize(const struct Hrtf *Hrtf);
|
||||
ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3], const ALfloat newdir[3]);
|
||||
|
Loading…
Reference in New Issue
Block a user