On Thu, 27 Jul 2023 03:46:23 GMT, Renjith Kannath Pariyangad <[email protected]>
wrote:
>> Hi Reviewers,
>>
>> Observations :
>> 1. Without com initialize if we access Mixer for recording, library loaded
>> invalid GUID and clipped description in windows(ID not found in registry).
>> With com initialization library load proper GUID (same as registry).
>> 2. For Play back device always loading proper device GUID irrespective of
>> com Initialization.
>>
>> Test:
>> Since screen lock and unlock workflow required for reproducing this issue,
>> did coupe of iteration of manual testing post fix and confirmed its
>> resolving the problem.
>> To reconfirm nothing is broken, executed all audio related test cases on
>> test bench post fix and all are green.
>>
>> Please review the changes and let me know your comments if any.
>>
>> Regards,
>> Renjith.
>
> Renjith Kannath Pariyangad has updated the pull request incrementally with
> one additional commit since the last revision:
>
> Added COM init for DAUDIO_GetDirectAudioDeviceDescription
I created a short native app, `SoundDevices.exe`, attached to the JBS with its
source code in `SoundDevices.cpp`.
By default, it calls `CoInitializeEx` but if you pass ‘0’ as the parameter, it
does not initialise COM.
I get the following output:
C:\dev\audio>SoundDevices.exe 0
Sound Devices
000001A3168F1104
{1A29CAD2-72C7-40B4-A39B-94D71FC91E3F}
Speakers (Realtek(R) Audio)
{0.0.0.00000000}.{1a29cad2-72c7-40b4-a39b-94d71fc91e3f}
Sound Capture Devices
000001A3168F0D24
{BDF35A00-B9AC-11D0-A619-00AA00A7C000}
Microphone Array (Realtek(R) Au
{0.0.1.00000000}.{473909c9-5435-4fb1-ab77-18838bdfa76c}
C:\dev\audio>SoundDevices.exe 1
Sound Devices
000001A56FDB1104
{1A29CAD2-72C7-40B4-A39B-94D71FC91E3F}
Speakers (Realtek(R) Audio)
{0.0.0.00000000}.{1a29cad2-72c7-40b4-a39b-94d71fc91e3f}
Sound Capture Devices
000001A56FDB0D24
{473909C9-5435-4FB1-AB77-18838BDFA76C}
Microphone Array (Realtek(R) Audio)
{0.0.1.00000000}.{473909c9-5435-4fb1-ab77-18838bdfa76c}
(I removed Primary devices from the output above.)
It confirms Renjith's observations: if COM isn't initialised, the description
of the capture device, _Microphone Array_, gets truncated, and its GUID is
different from the driver GUID.
It get the same results on other systems where I ran the app.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1653929284