This is a different issue. It seems the OpenAL dll was loaded, but the alcOpenDevice function was not found so its invocation throws a NullReferenceException (no exception is thrown when it fails to load).
@Pixi91 Can you verify that the x64/soft_oal.dll and x86/soft_oal.dll libraries are in your bin folder?
@harry-cpp Could this happen when the OpenAL Soft lib isn’t found? It looks like we don’t do any error checking so we only detect that the lib isn’t loaded when any of the functions are run.
Yes, they can be found in those folders. The error occurs only if the # character is in the path. If I do not try to start inside Visual Studio, but manualy run .exe from the debug folder, I do not get any error messages, simply the program will not start, the clock will flash briefly next to the cursor, but nothing happen. If I remove the # character at any time, the error will disappear in the already finished debug folder. Windows project don’t generate this error. If I remember correctly, version 3.6 did not have this bug yet.
We made the same mistake loading OpenAL Soft as we did with SDL, I’ll have a fix up ASAP.
EDIT: Fix is up.
EDIT2: Fix has been merged. You can get a develop build from the downloads page: http://www.monogame.net/downloads/
I am using Mac and Visual Studio for Mac and when I want to create a project I did not found the multiplatform template and I do not find any for Linux
Hi, I experienced a weird issue, trying to playing Songs under iOS.
I imported my_song.mp3 file via content pipeline (using “Mp3 Importer - MonoGame”) and load and play it as follows:
Song msx = Content.Load<Song>("my_song"); Microsoft.Xna.Framework.Media.MediaPlayer.Play(msx);
All the things goes well, no errors was generated and the Microsoft.Xna.Framework.Media.MediaPlayer.State is “Playing”, but no music is audible (of course, the volume is correctly set…).
I tried with various format of mp3 and also with .ogg, with the same result.
I tried to downgrade to release 3.6 and the above code works well. In simulator and in real devices the songs play fine.
So, it’s definitively confirmed it’s an issue of the latest 3.7 / 3.7.1 releases of monogame.
I am very curious to discover the reasons of this bug…
Nobody can help us?
Visual studio makes it a lot easier to get started. So i would recommend to use that one. You could use vs code but that is a lot more hassle to get it working.
Guys, a small suggestion - please update the News (“Latest Headlines”) section on the main page. From how it looks right now, one might think that version 3.6 is current…
This problem achieves again but on another hardware
Microsoft.Xna.Framework.Audio.NoAudioHardwareException (0x80004005): OpenAL device could not be initialized, see console output for details.
at Microsoft.Xna.Framework.Audio.OpenALSoundController..ctor () [0x00023] in <0e67766603aa4628bb7aefee84bb62c4>:0
at Microsoft.Xna.Framework.Audio.OpenALSoundController.get_GetInstance () [0x00007] in <0e67766603aa4628bb7aefee84bb62c4>:0
at Microsoft.Xna.Framework.SdlGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x000cd] in <0e67766603aa4628bb7aefee84bb62c4>:0
at Microsoft.Xna.Framework.GamePlatform.PlatformCreate (Microsoft.Xna.Framework.Game game) [0x00000] in <0e67766603aa4628bb7aefee84bb62c4>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00213] in <0e67766603aa4628bb7aefee84bb62c4>:0
at Terminal.Payment.UI.MyGame..ctor () [0x00000] in /media/destructor/SSD/Projects/TerminalClient_v7/GUI/Standard/TerminalUI/MonoGame.cs:41
Yes. I copied all Debug folder from my development machine to another machine with Radeon VGA. On my machine all works and other machines all works but on this Radeon it does not work. More over when I copied 3.6 version instead 3.7.1 to Radeon that also it begins to work.