Bug 1475 - Allow to retrieve devices specifiers with ALC_ENUMERATE_ALL_EXT
Summary: Allow to retrieve devices specifiers with ALC_ENUMERATE_ALL_EXT
Status: RESOLVED FIXED
Alias: None
Product: Joal
Classification: JogAmp
Component: core (show other bugs)
Version: 2.6.0
Hardware: All all
: P4 enhancement
Assignee: Mathieu Féry (MathiusD)
URL:
Depends on:
Blocks:
 
Reported: 2023-11-10 15:47 CET by Mathieu Féry (MathiusD)
Modified: 2023-11-28 17:43 CET (History)
3 users (show)

See Also:
Type: FEATURE
SCM Refs:
1aa6f3080953eb4b3a4018b805a014c95dfce4dd
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Féry (MathiusD) 2023-11-10 15:47:22 CET
Currently, when you want to retrieve the names of all the audio elements present, you can use several OpenAL constants offered by various extensions:
 * ALC_DEVICE_SPECIFIER
 * ALC_CAPTURE_DEVICE_SPECIFIER
 * ALC_ALL_DEVICES_SPECIFIER

The first two are part of the ALC_ENUMERATION_EXT extension, and the last is part of the ALC_ENUMERATE_ALL_EXT extension.

However, all 3 can be obtained via the alcGetString(null, param) method, which instead of returning a null terminated string, returns a doubly null terminated string, allowing you to store an array of strings in it.

Management of doubly null terminated strings is already handled, but was only activated for ALC_DEVICE_SPECIFIER.

Here, management has been extended to all three parameters.

And JOALVersion now shows all devices present with the 3 parameters (since the ALC_ENUMERATE_ALL_EXT extension is not necessarily present, but shows more comprehensible results for the user instead of just the 'OpenAL Soft' driver).
Comment 1 Mathieu Féry (MathiusD) 2023-11-10 15:52:36 CET
I've made a patch available here : https://github.com/MathiusD/joal in 1475-devices-specifiers
Comment 2 Julien Gouesse 2023-11-23 10:00:49 CET
(In reply to Mathieu Féry (MathiusD) from comment #1)
https://github.com/JogAmp/joal/compare/master...MathiusD:joal:1475-devices-specifiers

Good job. Thank you for your changes. It looks good to me. Sven should look at all this more carefully.
Comment 3 Sven Gothel 2023-11-26 09:27:35 CET
Thank you Mathieu, great stuff as usual and nice to see you have time to hack along.
I myself also return for a few rounds of lines,
so I will review and merger your work of course.
Comment 4 Mathieu Féry (MathiusD) 2023-11-27 13:52:34 CET
Thanks a lot, i'm happy to have some time for some hack along :)
Comment 5 Sven Gothel 2023-11-28 12:14:02 CET
Great stuff Mathieu!

+++

commit 1aa6f3080953eb4b3a4018b805a014c95dfce4dd

    Bug 1475: Minor revision of orig patch-set
    
    - Implement ALC.alcIsDoubleNullTerminatedString() in Java w/ our existing functionality,
      drop JNI function
    
    - JoalVersion.devicesToString(..) revert to original API
      dropping boolean params
    
    - C: Drop using stdbool.h, earmarked as obsolete in std