adrianstevens / Xamarin-Plugins

Cross-platform Plugins for Xamarin, Xamarin.Forms and Windows
https://www.nuget.org/packages/Xam.Plugin.SimpleAudioPlayer/
MIT License
132 stars 53 forks source link

Crashes with "Does not support cloning" #86

Open BillyMartin1964 opened 3 years ago

BillyMartin1964 commented 3 years ago

If one audio file is not yet done playing when another is call, the entire app crashes.

System.NotSupportedException: This IRandomAccessStream does not support the CloneStream method because it requires cloning and this stream does not support cloning.

System.IO NetFxToWinRtStreamAdapter.ThrowCloningNotSupported (String) System.IO NetFxToWinRtStreamAdapter.CloneStream () Yatzy.UWP!+0x1b85626 System.Runtime.InteropServices McgMarshal.ThrowOnExternalCallFailed (Int32, RuntimeTypeHandle) Interop ComCallHelpers.Call (ComObject, RuntimeTypeHandle, Int32, Void*) __Interop ForwardComStubs.Stub_15[TThis] (__ComObject, Int32) Plugin.SimpleAudioPlayer SimpleAudioPlayerImplementation.Seek (Double) Plugin.SimpleAudioPlayer SimpleAudioPlayerImplementation.DeletePlayer () Plugin.SimpleAudioPlayer SimpleAudioPlayerImplementation.Load (Stream) Yatzy.ViewModels GamePlayViewModel.PlaySounds (String) Yatzy.ViewModels.GamePlayViewModel

d__491.MoveNext () System.Runtime.ExceptionServices ExceptionDispatchInfo.Throw () System.Runtime.CompilerServices.AsyncMethodBuilderCore <>c.b__7_0 (Object) System Action`1.Invoke (T) System.Threading.WinRTSynchronizationContext Invoker.InvokeCore () System.Runtime.InteropServices McgMarshal.ThrowOnExternalCallFailed (Int32, RuntimeTypeHandle) __Interop ComCallHelpers.Call (__ComObject, RuntimeTypeHandle, Int32) __Interop ForwardComStubs.Stub_16[TThis] (__ComObject, Int32) Microsoft.AppCenter.Utils