Git Product home page Git Product logo

Comments (6)

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Unless you are using XACT and/or plan to update your MonoGame branch on at least an hourly basis, do not use the mgsdl2-xact branch. Additionally, you'll likely get better results if you compile the assets (not just audio) with the XNA content builder from your original XNA project.

For wav files, if you must use them, I believe you can load a SoundEffect with SoundEffect.FromStream() instead of putting up with the ContentManager.

For the deps, cd MonoGame; git submodule init; git submodule update.

from fna-mghistory.

deowk avatar deowk commented on July 19, 2024

Thank you for the reply....

I have implemented the SoundEffects.FromStream() method to load the audio files but I now get the following exception.

System.DllNotFoundException has been thrown
/usr/local/lib/libopenal.1.dylib

I have installed openal-soft and the binary is in that folder I just don't know why monogame is not seeing it.

My SDL#.dll.config files looks like this:

<dllmap dll="SDL2_image.dll" os="windows" target="SDL2_image.dll"/>
<dllmap dll="SDL2_image.dll" os="osx" target="libSDL2_image-2.0.0.dylib"/>
<dllmap dll="SDL2_image.dll" os="linux" target="libSDL2_image-2.0.so.0"/>

<dllmap dll="SDL2_mixer.dll" os="windows" target="SDL2_mixer.dll"/>
<dllmap dll="SDL2_mixer.dll" os="osx" target="/Library/Frameworks/SDL2_mixer.framework/SDL2_mixer"/>
<dllmap dll="SDL2_mixer.dll" os="linux" target="libSDL2_mixer-2.0.so.0"/>

<dllmap dll="SDL2_ttf.dll" os="windows" target="SDL2_ttf.dll"/>
<dllmap dll="SDL2_ttf.dll" os="osx" target="libSDL2_ttf-2.0.0.dylib"/>
<dllmap dll="SDL2_ttf.dll" os="linux" target="libSDL2_ttf-2.0.so.0"/>

<dllmap dll="openal32.dll" os="windows" target="openal32.dll"/>
<dllmap dll="openal32.dll" os="osx" target="/usr/local/lib/libopenal.1.dylib"/>
<dllmap dll="openal32.dll" os="linux" target="libopenal.so.1"/>

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

You probably won't want to require a from-source installation of OpenAL Soft; I think you can just poke the dylib into the output directory and MonoDevelop will know to look in the game's local directory to pick up native libs. If not that (or you're using xbuild rather than MonoDevelop), it should at least be possible to run with it in the MonoKickstart environment that you'll be using in the Release version:

https://github.com/flibitijibibo/MonoKickstart

You can also shamelessly rip off one of my ports' OSX environments to run C# assemblies:

http://www.flibitijibibo.com/index.php?page=Portfolio/Ports#06_capsized.txt

(Capsized and below are all MG-SDL2 projects.)

from fna-mghistory.

deowk avatar deowk commented on July 19, 2024

Ok I got it running with MonoKickstart, but even though I copied the libopenal.1.dylib to the output directory I still get the same exception.

Unhandled Exception:
System.DllNotFoundException: libopenal.1.dylib
at (wrapper managed-to-native) OpenTK.Audio.OpenAL.AL.GenBuffers (int,int*) <0x00067>
at OpenTK.Audio.OpenAL.AL.GenBuffers (int,int&) <0x00013>
at OpenTK.Audio.OpenAL.AL.GenBuffers (int) <0x0003b>

I would like to run the game from within the IDE for debugging purposes but MonoDevelop just does not seem to recognise the dylib?

I got openal-soft from here --> http://kcat.strangesoft.net/openal.html

built from source and used the libopenal.1.dylib from there, is there another way I should be doing this?

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Built as 64-bit only maybe? Note that only 32-bit Mono is downloadable from Xamarin.

from fna-mghistory.

deowk avatar deowk commented on July 19, 2024

Dho! That's it...:)

Thanks for your help...really appreciate it

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.