2
\$\begingroup\$

MP4 AAC is a well supported playback format according to the docs, but the MonoGame content project only seems to compile MP3/WAV/WMA formats. I tried to put raw aac files in my android game but the content manager wouldnt load them, only raw wav files work, but they are large in size. I would like to know how to load aac or ogg audio files.

\$\endgroup\$
2
  • \$\begingroup\$ What specific problem did you run into, when you say content manager wouldnt load them? Did you get an exception of some sort? \$\endgroup\$
    – ashes999
    Commented May 27, 2014 at 14:53
  • \$\begingroup\$ @ashes999 Well there are only Content Importer options for mp3/wav/wma, no aac or ogg importer. If I try to compile aac with importer set to wma for example, I get a 'Failed to open file. Ensure the file is a valid audio file and is not DRM protected.' error. So my question is if its possible to compile aac and ogg, and if so, how? \$\endgroup\$
    – user26471
    Commented May 28, 2014 at 0:17

1 Answer 1

1
\$\begingroup\$

Loading OGG files should work the same as MP3s. I have this working in my own games, as simply as (pseudocode):

var sound = ContentManager.Load("blah.ogg");
sound.Play();

The issue I ran into is that some devices (especially older ones) may not always work with every kind of file format.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .