Setting
<PublishTrimmed>false</PublishTrimmed> in the .csproj file of any app using net6.0+ breaks directsound playback.
Seems like it's stripping out com references - needs some annotations in there to prevent stripping.
Adding TrimmerRootAssembly and messing with TrimMode doesn't seem to have any effect.
Disabling trimming fixes it but results in a 200mb file instead of a 50mb file
I started rewriting things to get it to work but ended up needing to turn WaveFormat into a struct which opened up a whole can of worms.
Workaround is to use SDL via nuget instead of DirectSound
Setting
<PublishTrimmed>false</PublishTrimmed>
in the .csproj file of any app using net6.0+ breaks directsound playback. Seems like it's stripping out com references - needs some annotations in there to prevent stripping. Adding TrimmerRootAssembly and messing with TrimMode doesn't seem to have any effect. Disabling trimming fixes it but results in a 200mb file instead of a 50mb file