Causes a lot of missing sound spam when the audio device is set to a non-default.
Reproduce:
Set the headset as the default audio device(TRS 3.5mm) on the PC.
[media]
Set game audio device as monitor speaker(HDMI 2.1).
[media]
Open the game.
[media]
Linked issues
relates to 2
Attachments
Comments

I'm not sure if this is the same issue, but when switching my audio device from VoiceMeeter Input to Speaker/Headphone (Realtek High Definition Audio), this is continuously shown in the game output until switching the device again:
Get attributes size<long number>: Invalid device.
Error starting SoundSystem. Turning off sounds & music
java.lang.IllegalStateException: Failed to get OpenAL attributes
at ebh.i(SourceFile:212)
at ebh.a(SourceFile:168)
at fre.h(SourceFile:113)
at fre.a(SourceFile:103)
at fre.a(SourceFile:235)
at frh.a(SourceFile:266)
at eio.q(SourceFile:1877)
at eio.f(SourceFile:1142)
at eio.e(SourceFile:776)
at net.minecraft.client.main.Main.a(SourceFile:244)
at net.minecraft.client.main.Main.main(SourceFile:51)
@@unknown, according to your description, it looks like MC-247421.

I was thinking this, but the error I was getting is slightly different, being
Failed to get OpenAL attributes
rather than
Failed to open OpenAL device
Maybe the error changed wording between updates?
I can confirm this behavior. In my testing, this was often followed by the error message as stated in MC-247421.