Closed mcdis closed 6 years ago
I had the same issue about Null able type must have value when trying to create new, note was using VB.net !!! but works if i revert to previous version of sharpDX audio on GIT HUB !!!1
AudioDX: Version is 2.8
App - 64 bit Win10
I have a similar issue. If I use the default version then I get the 'Nullable object must have a value' when creating the MasteringVoice. It happens for x86 and x64, desktop and uwp. If I force 2,7 then it works on desktop.
Same here like mikestek said.
Some info: With 4.0.1 (previous version of SharpDX) on Win10 with Default or null parameter constructor creates AudioDX as 2.8 and on Win7 as 2.7 automatically. Now (4.1.0) it only works with 2.7 by manually.
Not sure if this is actually the same issue as OP's, but I too am getting the 'Nullable object must have a value' exception when creating the MasteringVoice. If anyone has a workaround without forcing 2.7, that'd be awesome. Otherwise I guess I'll have to downgrade back to 4.0.1.
@waltdestler I think it's the same. I'm also having the same problem. I had to revert to 4.0.1.
I have also reverted back, but to 4.1.0 I believe.
Downgrading to 4.0.1 of XAudio2 fixed the issue for me. Thanks guys for all the pointers! For the longest time I thought it was something on my end.
Could you try with the preview version 4.2.0-ci284
just to make sure this is working? I tested it on the samples and it was, so I would like to confirm that it is fixing this issue before promoting it to 4.2.0. The 4.1.0 version of SharpDX had actually many codegen regressions and is barely usable.
Personally, 4.2.0-ci284
works for me.
Tested my code fully on 4.0.1 and was fine. So promoted to 4.2.0-ci284 and MasteringVoice is missing the volume property. I also have installed 4.2.0 and has same issue. Volume property has disappeared since 4.0.1
Just to add, I didnt test 4.2.0-ci284 due to the compile issues.
Yeah, keep in mind with my test, that my engine is still in pre-alpha so isn't using almost any of the audio features. So that's why I could compile it seems. My code isn't using any volume property just yet. Only the initialization works.
Tested my code fully on 4.0.1 and was fine. So promoted to 4.2.0-ci284 and MasteringVoice is missing the volume property. I also have installed 4.2.0 and has same issue. Volume property has disappeared since 4.0.1
@jkoritzinsky maybe a regression there too?
@h1cks , are you sure that the Volume
property belongs into the MasteringVoice
class? The VS's object viewer doesn't show me for 4.0.1
a Volume
property either. It's the Voice
class that has one property named Volume
, though.
@SouldomainTM Can confirm that 4.0.1 has a mastering voice Volume attribute, in mastering voice there is a SetVolume but there is no volume attribute, this is actually off the inherited class "Voice" which both sourcevoice and mastering voice share. The mastering voice was the only time I was using the attribute of Volume. Confirmed its voice
class.
@h1cks , I think you may want to make a new thread for this issue. The Volume
property isn't in4.2.0
preview either. There is only some SetVolume
, and GetVolume
method in Voice
class.
@xoofx The signature for SetVolume
isn't compatible with the property generator. I'd suggest manually writing the property or just using the GetVolume
and SetVolume
methods until I add a feature to the property generation to account for defaulted parameters.
I will attempt to retry the release candidate tonight. I have also discovered a side issue which I will raise as a seperate ticket.
@xoofx The signature for SetVolume isn't compatible with the property generator. I'd suggest manually writing the property or just using the GetVolume and SetVolume methods until I add a feature to the property generation to account for defaulted parameters.
Ok, that's unfortunate that I didn't catch this during the SharpGen switch, because I would have prefer that we don't introduce API regression.
Anyway, ok, so @h1cks please use GetVolume/SetVolume instead on the new API
I am still getting this issue with SharpDX.XAudio2 4.2.0 stable. The error message is this:
DeviceCount = '_device.DeviceCount' threw an exception of type 'System.InvalidOperationException'
. I get this when creating the XAudio2 device and i am crashing when the mastering voice is created.
For some reason this error only occurs in my .NET Core 2.1 console application. In my xunit test (.NET Core 2.1 aswell) this doesn't happen.
The instance has created but DeviceCount throw exception. Version is 2.8 2.7 and 2.9 can't create (Dll not found exception). App - 64 bit Win10 10.0.14393