[Bug] Cannot play Song from OGG?

Edit: This is no longer a problem, though I never solved the original issue. See below!

Hi!

I just picked up a project from a few years ago and have had some issues with starting the project back up. Namely, when I try to load in a song (song.ogg), I hit this error every time:

Exception thrown: 'SharpDX.SharpDXException' in SharpDX.dll An unhandled exception of type 'SharpDX.SharpDXException' occurred in SharpDX.dll HRESULT: [0xC00D36C4], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: The byte stream type of the given URL is unsupported.

This is thrown regardless of if I use content.Load<Song>("music/song" or Song.FromUri("name", new Uri("Content/music/song.ogg", UriKind.Relative")) to load the song. Does anyone have any ideas on how to resolve this error?

A little more context on the build:

I originally started off in Monogame 3.4 I think, on VS2015. Builds ran fine and I was able to load this OGG file with no issue. I’m now on Monogame 3.7.1 on VS2019, running on the same project solution from the original build. I use the Monogame Content Pipeline to include sound files and don’t otherwise have them in the project. I’ve got OpenAL installed, as well as the latest DirectX and .NET Framework 4.5. I’m on Windows 10 (whatever the latest public release is). Let me know if there’s any information I haven’t included that would be helpful to have.

Thanks for reading! Currently tearing my hair out over trying to resolve this. The project builds if I just comment out the lines loading this OGG file in.

I’d try to start a new project under the new version and copy all the needed files into the new version and build (had a similar problem before after update).

1 Like

I ended up doing this in the end. I tried dereferencing and rereferencing the Monogame library, but that made things worse. I found a VS 2017 installer, and made a new project from there to work with. It took about 10 minutes to move everything over (rebuilding the pipeline was the most annoying part - the code files themselves were actually quite easy to shift around), and after that it worked like a charm! Thanks for giving me the confidence do that!

1 Like