/// <summary> /// Gets an instance of the API. /// </summary> /// <returns>The instance.</returns> public static unsafe ALContext GetApi() { var ctx = new MultiNativeContext (CreateDefaultContext(new OpenALLibraryNameContainer().GetLibraryName()), null); var ret = new ALContext(ctx); ctx.Contexts[1] = new LamdaNativeContext( x => { if (x.EndsWith("GetProcAddress") || x.EndsWith("GetContextsDevice") || x.EndsWith("GetCurrentContext")) { return(default);
/// <summary> /// Gets an instance of the API. /// </summary> /// <param name="soft">Use OpenAL Soft libraries.</param> /// <returns>The instance.</returns> public static unsafe ALContext GetApi(bool soft = false) { SearchPathContainer searchPaths = soft ? new OpenALSoftLibraryNameContainer() : new OpenALLibraryNameContainer(); var ctx = new MultiNativeContext (CreateDefaultContext(searchPaths.GetLibraryName()), null); var ret = new ALContext(ctx); ret._soft = soft; ret._searchPaths = searchPaths; ctx.Contexts[1] = new LamdaNativeContext( x => { if (x.EndsWith("GetProcAddress") || x.EndsWith("GetContextsDevice") || x.EndsWith("GetCurrentContext")) { return(default);
public ALLoader(ALContext alc) { _alc = alc; }