I am trying to play an M4A (MP4 Audio) file directly from the internet using a URL.
I'm using NAudio with the MediaFoundation to achieve this:
using (var reader = new MediaFoundationReader(audioUrl)) //exception
using (var wave = new WaveOutEvent())
{
wave.Init(reader);
wave.Play();
}
This works well on two test systems with Windows 8.1 and Windows 10. But on my Windows 7 machine it is not working, I am getting an exception from inside the MediaFoundationReader
constructor.
Initially, I was getting an ArgumentOutOfRangeException
. I tested playing this m4a file in WMP and it was also unable to play it. I downloaded a codec pack and installed it. That helped with WMP but my code was still throwing an exception, albeit another one:
An unchecked exception of type 'System.Runtime.InteropServices.COMException' occurred in NAudio.dll
Additional information: There is more data available. (Exception from HRESULT: 0x800700EA)
Any ideas what could be causing this and how I can fix it?
With some research i identified this
0X800700ea can occur when your Windows operating system becomes corrupted. There can be numerous reason that this error occur including excessive startup entries, registry errors, hardware/RAM decline, fragmented files, unnecessary or redundant program installations and so on.
Can you try you program in another system and verify
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With