filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.23k stars 459 forks source link

[Linux] System.DllNotFoundException: mfplat.dll #419

Open sk-zk opened 4 years ago

sk-zk commented 4 years ago

Trying to use the CodecFactory crashes with this exception. I'm using 1.2.1.2 on Ubuntu 19.10.

System.TypeInitializationException: The type initializer for 'CSCore.Codecs.CodecFactory' threw an exception. ---> System.DllNotFoundException: mfplat.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at at (wrapper managed-to-native) CSCore.MediaFoundation.NativeMethods.MFTEnum(System.Guid,int,CSCore.MediaFoundation.MFTRegisterTypeInfo,CSCore.MediaFoundation.MFTRegisterTypeInfo,intptr,intptr&,int&)
  at CSCore.MediaFoundation.MFTEnumerator.EnumerateTransforms (System.Guid category, CSCore.MediaFoundation.MFTRegisterTypeInfo inputType, CSCore.MediaFoundation.MFTRegisterTypeInfo outputType) [0x00000] in <1843f47f564646f9a7e13dbef8f04de8>:0
  at CSCore.MediaFoundation.MediaFoundationCore.IsTransformAvailable (System.Guid category, System.Guid transformClsid) [0x0000d] in <1843f47f564646f9a7e13dbef8f04de8>:0
  at CSCore.Codecs.WMA.WmaDecoder.get_IsSpeechSupported () [0x0000c] in <1843f47f564646f9a7e13dbef8f04de8>:0
  at CSCore.Codecs.WMA.WmaDecoder.get_IsSupported () [0x00000] in <1843f47f564646f9a7e13dbef8f04de8>:0
  at CSCore.Codecs.CodecFactory..ctor () [0x001e2] in <1843f47f564646f9a7e13dbef8f04de8>:0
  at CSCore.Codecs.CodecFactory..cctor () [0x00000] in <1843f47f564646f9a7e13dbef8f04de8>:0
  --- End of inner exception stack trace ---
  at test1.MainClass.Main (System.String[] args) [0x00001] in /home/daniel/Projects/test1/test1/Program.cs:11
filoe commented 4 years ago

Which branch are you using? There is a wip branch called netstandard which does not load all codecs by default but only the supported ones.

sk-zk commented 4 years ago

Yeah, that was on master. netstandard works fine