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
Sometimes the user doesn't have enough privileges to run COM Methods.
Try to run the application as Administrator.
User contributions licensed under CC BY-SA 3.0