public GlobalDataPackage() { TextureObjectDictionary = new Dictionary <string, TextureObject>(); try { DeviceXaudio2 = new XAudio2(); MasteringVoice = new MasteringVoice(DeviceXaudio2); SoundInitSuccess = true; BGM_Player = new Wave_Player(DeviceXaudio2); } catch { MessageBox.Show("音频设备故障", "Sound Initial Error"); } }
public GlobalDataPackage() { this.TextureObjectDictionary = new Dictionary <string, TextureObject>(); try { this.DeviceXaudio2 = new SlimDX.XAudio2.XAudio2(); this.MasteringVoice = new MasteringVoice(this.DeviceXaudio2); this.SoundInitSuccess = true; this.BGM_Player = new Wave_Player(this.DeviceXaudio2); } catch { int num = (int)MessageBox.Show("音频设备故障", "Sound Initial Error"); } }