diff options
author | MathiusD <[email protected]> | 2023-12-02 04:25:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-02 03:25:59 +0000 |
commit | 424933403f04627a3b07f53bcbb3d1ad1242114c (patch) | |
tree | ba6140130520d02243a347d912110a5cd83e3dbe /utils/openal-info.c | |
parent | 571b546f35eead77ce109f8d4dd6c3de3199d573 (diff) |
feat(openal-info): Add values related to sources inside openal-info.c (#940)
* feat(openal-info): Add values related to sources inside openal-info.c
* fix(openal-info): Update display of nb of sources
CF following comment : https://github.com/kcat/openal-soft/pull/940#discussion_r1409659608
Diffstat (limited to 'utils/openal-info.c')
-rw-r--r-- | utils/openal-info.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/openal-info.c b/utils/openal-info.c index 8ef6ebde..cb013098 100644 --- a/utils/openal-info.c +++ b/utils/openal-info.c @@ -181,6 +181,14 @@ static void printHRTFInfo(ALCdevice *device) checkALCErrors(device); } +static void printALCIntegerValue(ALCdevice *device, ALCenum enumValue, char* enumName) +{ + ALCint value; + alcGetIntegerv(device, enumValue, 1, &value); + if (checkALCErrors(device) == ALC_NO_ERROR) + printf("%s: %d\n", enumName, value); +} + static void printModeInfo(ALCdevice *device) { ALCint srate = 0; @@ -228,6 +236,9 @@ static void printModeInfo(ALCdevice *device) } printf("Device HRTF profile: %s\n", hrtfname ? hrtfname : "<null>"); } + + printALCIntegerValue(device, ALC_MONO_SOURCES, "Device number of mono sources"); + printALCIntegerValue(device, ALC_STEREO_SOURCES, "Device number of stereo sources"); } static void printALCSOFTSystemEventIsSupportedResult(LPALCEVENTISSUPPORTEDSOFT alcEventIsSupportedSOFT, ALCenum eventType, ALCenum deviceType) |