buffer up all the audio upfront

This commit is contained in:
Chris Forbes
2010-08-11 22:56:32 +12:00
parent 8dd9848636
commit ca6debde66
4 changed files with 69 additions and 38 deletions

View File

@@ -48,10 +48,11 @@ namespace OpenRA
public static void SetListenerPosition(float2 position) { soundEngine.SetListenerPosition(position); }
static ISoundSource rawSource;
public static void PlayRaw(byte[] raw)
{
var sound = LoadSoundRaw(raw);
soundEngine.Play2D(sound, false, true, float2.Zero, SoundVolume);
rawSource = LoadSoundRaw(raw);
soundEngine.Play2D(rawSource, false, true, float2.Zero, SoundVolume);
}
public static void Play(string name)