public bool InitializeSound(CameraListenerBase listener, FreeSL.FSL_SOUND_SYSTEM soundSystem) { lock (LockSync) { _listener = new FSLListener(listener); if (_initSound) { return(true); } if (!FreeSL.fslInit(soundSystem)) //Change if desire { return(false); } _initSound = true; /*FreeSL.ErrorCallbackDelegate ErrorDelegate = new FreeSL.ErrorCallbackDelegate(ErrorCallback); * GCHandle AllocatedDelegate = GCHandle.Alloc(ErrorDelegate); * FreeSL.fslSetErrorCallback(ErrorDelegate);*/ updaterThread = new Thread(new ThreadStart((UpdateSoundObjects))); updaterThread.Name = "Wof - sound updater thread " + updaterThread.GetHashCode(); updaterThread.Start(); return(true); } }
public bool InitializeSound(Mogre.Camera listener) { _listener = new FSLListener(listener); if (_initSound) return true; if (!FreeSL.fslInit(FreeSL.FSL_SOUND_SYSTEM.FSL_SS_DIRECTSOUND3D)) //Change if desire return false; _initSound = true; return true; }