Fix #17230: Dummy audio output class
This commit is contained in:
committed by
abcdefg30
parent
70b1df6ce7
commit
72eb4e1749
@@ -45,10 +45,12 @@ namespace OpenRA
|
||||
ISound video;
|
||||
MusicInfo currentMusic;
|
||||
Dictionary<uint, ISound> currentSounds = new Dictionary<uint, ISound>();
|
||||
public bool DummyEngine { get; private set; }
|
||||
|
||||
public Sound(IPlatform platform, SoundSettings soundSettings)
|
||||
{
|
||||
soundEngine = platform.CreateSound(soundSettings.Device);
|
||||
DummyEngine = soundEngine.Dummy;
|
||||
|
||||
if (soundSettings.Mute)
|
||||
MuteAudio();
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace OpenRA
|
||||
ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate);
|
||||
ISound Play2D(ISoundSource sound, bool loop, bool relative, WPos pos, float volume, bool attenuateVolume);
|
||||
ISound Play2DStream(Stream stream, int channels, int sampleBits, int sampleRate, bool loop, bool relative, WPos pos, float volume);
|
||||
bool Dummy { get; }
|
||||
float Volume { get; set; }
|
||||
void PauseSound(ISound sound, bool paused);
|
||||
void StopSound(ISound sound);
|
||||
|
||||
Reference in New Issue
Block a user