mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
improve logging of opened audio device
In fact, ALC_DEVICE_SPECIFIER is only a fallback if the ALC_ENUMERATE_ALL_EXT extension is not available. Also added logging the sample rate. I would have liked to log the used resampler as well, but apparently this requires jumping through some more loops.
This commit is contained in:
parent
654ddf6200
commit
aa17f83ac0
@ -560,13 +560,20 @@ void I_InitSound(void)
|
||||
setenv("ALSOFT_CONF", WOOFDATADIR"/alsoft.conf", 0);
|
||||
#endif
|
||||
|
||||
name = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
device = alcOpenDevice(NULL);
|
||||
|
||||
device = alcOpenDevice(name);
|
||||
if (device)
|
||||
{
|
||||
ALCint srate = -1;
|
||||
|
||||
if (alcIsExtensionPresent(device, "ALC_ENUMERATE_ALL_EXT") != AL_FALSE)
|
||||
name = alcGetString(device, ALC_ALL_DEVICES_SPECIFIER);
|
||||
else
|
||||
name = alcGetString(device, ALC_DEVICE_SPECIFIER);
|
||||
printf("Using '%s'.\n", name);
|
||||
|
||||
alcGetIntegerv(device, ALC_FREQUENCY, 1, &srate);
|
||||
|
||||
printf("Using '%s' @ %d Hz.\n", name, srate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user