Пример #1
0
        private void InitOpenAL()
        {
            try
            {
                AL.Create();
            }
            catch (LWJGLException e)
            {
                throw new OpenALException(e);
            }

            string deviceName = null;
            string os         = System.GetProperty("os.name");

            if (os.StartsWith("Windows"))
            {
                deviceName = "DirectSound3D";
            }

            string defaultSpecifier = ALC10.AlcGetString(AL.GetDevice(), ALC10.ALC_DEFAULT_DEVICE_SPECIFIER);

            Com.Printf(os + " using " + ((deviceName == null) ? defaultSpecifier : deviceName) + '\\');
            if (ALC10.AlcGetError(AL.GetDevice()) != ALC10.ALC_NO_ERROR)
            {
                Com.DPrintf("Error with SoundDevice");
            }
        }