add crap broken sound support for vqa

This commit is contained in:
Chris Forbes
2010-08-11 22:04:55 +12:00
parent 46fc0ef563
commit ec9da154ad
5 changed files with 59 additions and 13 deletions

View File

@@ -32,6 +32,11 @@ namespace OpenRA
return soundEngine.AddSoundSourceFromMemory(data, 1, 16, 22050);
}
static ISoundSource LoadSoundRaw(byte[] rawData)
{
return soundEngine.AddSoundSourceFromMemory(rawData, 1, 16, 22050);
}
public static void Initialize()
{
soundEngine = new OpenAlSoundEngine();
@@ -43,6 +48,12 @@ namespace OpenRA
public static void SetListenerPosition(float2 position) { soundEngine.SetListenerPosition(position); }
public static void PlayRaw(byte[] raw)
{
var sound = LoadSoundRaw(raw);
soundEngine.Play2D(sound, false, true, float2.Zero, SoundVolume);
}
public static void Play(string name)
{
if (name == "" || name == null)