コード例 #1
0
 public Settings()
 {
     _3DPanMaxAdjustment = 0.7f;
     Muted = false;
     ListenAtCameraPosition = false;
     MainCharacterListenHeight = 2;
     MinMaxDistance = new Vector2(1, 20);
     AmbientVolume = 0.5f;
     MasterVolume = 0.5f;
     MusicVolume = 0.5f;
     SoundVolume = 0.5f;
     InterfaceVolume = SoundVolume;
     VolumeScale2D3D = new Vector2(0.7f, 1);
     AudioDevice = new AudioDevice();
     Engine = ManagerGlue.JMOD;
 }
コード例 #2
0
        public override bool Equals(object obj)
        {
            AudioDevice b = (AudioDevice)obj;

            return(DeviceID == b.DeviceID);
        }
コード例 #3
0
        public SoundManager(AudioDevice audioDevice, ManagerGlue mg, float min3DDistance, float max3DDistance, JMOD.CustomReadFileMethodDelegate customReadFileMethod)
        {
            Instance = this;
            Settings = new Settings();
            minMaxDistance = new Vector2(min3DDistance, max3DDistance);
            #if DEBUG
            if (mg == ManagerGlue.FMOD)
                managerGlue = new FMODGlue.FMODManager();
            else
                if (mg == ManagerGlue.JMOD)
            #endif
                managerGlue = new JMODGlue.JMODManager();
            try
            {
                managerGlue.Init(audioDevice, minMaxDistance, nSoundChannels, customReadFileMethod);
            }
            catch (Exception ex)
            {
                throw new SoundManagerException
                {
                    Message = ex.Message,
                    StackTrace = ex.StackTrace,
                    InitLogString = managerGlue.InitLogString
                };
            }

            // adds all soundgroups in the SoundGroups enum
            foreach (SoundGroups sg in Enum.GetValues(typeof(SoundGroups)))
            {
                soundGroups.Add(sg, new SoundGroup(managerGlue.SystemGlue, sg.ToString()));
            }
            SetupSoundGroupSettings();
        }
コード例 #4
0
 public SoundManager(AudioDevice audioDevice, ManagerGlue mg, float min3DDistance, float max3DDistance)
     : this(audioDevice, mg, min3DDistance, max3DDistance, null)
 {
 }
コード例 #5
0
 public SoundManager(AudioDevice audioDevice, ManagerGlue mg, float min3DDistance, float max3DDistance) : this(audioDevice, mg, min3DDistance, max3DDistance, null)
 {
 }