Import an asset that is an audio file. In my case, I imported an MP3 file.
Expected behavior:
Being able to play the sound file and import it without any error logs.
What really happend:
I couldn't play the audio file and I got an error with following message:
Error exporting E:/Projects/WaveEngine Projects/MyWaveProject/Content/Scenes/BGM_Christmas.MP3.wesn.
System.NullReferenceException: Object reference not set to an instance of an object.
at MP3Sharp.Decoding.Decoders.LayerII.SubbandLayer2.prepare_sample_reading(Header header, Int32 allocation, Int32 channel, Single[] factor, Int32[] codelength, Single[] c, Single[] d)
at MP3Sharp.Decoding.Decoders.LayerII.SubbandLayer2.ReadScaleFactor(Bitstream stream, Header header)
at MP3Sharp.Decoding.Decoders.LayerII.SubbandLayer2Stereo.ReadScaleFactor(Bitstream stream, Header header)
at MP3Sharp.Decoding.Decoders.LayerIDecoder.ReadScaleFactors()
at MP3Sharp.Decoding.Decoders.LayerIDecoder.DecodeFrame()
at MP3Sharp.Decoding.Decoder.DecodeFrame(Header header, Bitstream stream)
at MP3Sharp.MP3Stream.ReadFrame()
at MP3Sharp.MP3Stream.Read(Byte[] buffer, Int32 offset, Int32 count)
at NAudio.Mp3Sharp.Mp3WaveReader.Read(Byte[] buffer, Int32 offset, Int32 count) in C:\agent\_work\24\s\src\Engine\Common\WaveEngine.Assets\Importers\Audio\Mp3WaveReader.cs:line 61
at WaveEngine.Assets.Importers.Audio.NAudioHelpers.GetDataStream(IWaveProvider waveProvider) in C:\agent\_work\24\s\src\Engine\Common\WaveEngine.Assets\Importers\Audio\NAudioHelpers.cs:line 48
at WaveEngine.Assets.Importers.Audio.NAudioImporter.ImportData(Stream stream, SoundSource source, Boolean rawData) in C:\agent\_work\24\s\src\Engine\Common\WaveEngine.Assets\Importers\Audio\NAudioImporter.cs:line 44
at WaveEngine.Framework.Assets.Importers.AAssetImporter`1.WaveEngine.Framework.Assets.Importers.IAssetImporter.ImportData(Stream stream, IAssetSource resource) in C:\agent\_work\24\s\src\Engine\Common\WaveEngine.Framework\Assets\Importers\AAssetImporter`1.cs:line 95
at WaveEngine.Assets.Exporters.BaseAssetExporter`2.BaseExport(TAsset asset, TProfile profile, ExportContext exportContext) in C:\agent\_work\24\s\src\Engine\Common\WaveEngine.Assets\Exporters\BaseAssetExporter`2.cs:line 60
Version: 3.3.0.8617-preview Tested affected versions: 3.2.0.7787-preview
Steps to reproduce:
Expected behavior:
What really happend: