Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I create an audio context with OpenAL in monodroid?
    primarykey
    data
    text
    <p>Whenever I try to create a new audio context in monodroid, it fallls over telling me that openal32.dll is missing; which naturally doesn't make sense, being as this is monodroid, and openal is included as part of OpenTK.</p> <p>I can only assume i'm doing something wrong, but i've used OpenTK/OpenAL before under windows and have managed just fine with similar code.</p> <p>anyway here is the offending code:</p> <pre><code> public Audio() { if (Loaded == false) { Loaded = true; try { try {Console.WriteLine ("Current: " + AudioContext.CurrentContext.ToString());} catch { Console.WriteLine ("no current context"); } try {Console.WriteLine ("Default: " + AudioContext.DefaultDevice);} catch { Console.WriteLine ("no default device"); } Context = new AudioContext(); ValidContext = true; //we have a valid audio context! } catch (Exception ex) { Console.WriteLine ("Loading the audio context failed."); Console.WriteLine (ex.ToString ()); Console.WriteLine (ex.Message); ValidContext = false; //Loading the audio context failed :( } } } </code></pre> <p>And here is the output:</p> <pre><code>I/monodroid-gc(24762): environment supports jni NewWeakGlobalRef D/AndroidGameView(24762): SurfaceCreated D/libEGL (24762): egl.cfg not found, using default config D/libEGL (24762): loaded /system/lib/egl/libGLES_android.so I/mono-stdout(24762): no current context I/mono-stdout(24762): no default device I/mono-stdout(24762): Loading the audio context failed. I/mono-stdout(24762): System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioContext ---&gt; System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Audio.AudioDeviceEnumerator ---&gt; System.DllNotFoundException: openal32.dll I/mono-stdout(24762): at (wrapper managed-to-native) OpenTK.Audio.OpenAL.Alc:MakeContextCurrent (intptr) I/mono-stdout(24762): at OpenTK.Audio.OpenAL.Alc.MakeContextCurrent (ContextHandle context) [0x00000] in &lt;filename unknown&gt;:0 I/mono-stdout(24762): at OpenTK.Audio.AudioDeviceEnumerator..cctor () [0x00000] in &lt;filename unknown&gt;:0 I/mono-stdout(24762): --- End of inner exception stack trace --- I/mono-stdout(24762): at OpenTK.Audio.AudioContext..cctor () [0x00000] in &lt;filename unknown&gt;:0 I/mono-stdout(24762): --- End of inner exception stack trace --- I/mono-stdout(24762): at Hardware.Audio..ctor () [0x00000] in &lt;filename unknown&gt;:0 I/mono-stdout(24762): An exception was thrown by the type initializer for OpenTK.Audio.AudioContext I/ARMAssembler(24762): generated scanline__00000177:03545444_00009001_00000000 [159 ipp] (215 ins) at [0x4fc138:0x4fc494] in 4168381 ns </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload