MusicSeekPosition

This commit is contained in:
alzeih
2010-08-14 14:24:25 +12:00
parent 1aa4f57a68
commit 3f4f1ff75e

View File

@@ -148,6 +148,11 @@ namespace OpenRA
}
}
public static float MusicSeekPosition
{
get { return (music != null)? music.SeekPosition : 0; }
}
// Returns true if it played a phrase
public static bool PlayVoice(string phrase, Actor voicedUnit)
{
@@ -198,6 +203,7 @@ namespace OpenRA
interface ISound
{
float Volume { get; set; }
float SeekPosition { get; }
}
class OpenAlSoundEngine : ISoundEngine
@@ -400,5 +406,15 @@ namespace OpenRA
Al.alSourcef(source, Al.AL_GAIN, volume = value);
}
}
public float SeekPosition
{
get
{
float pos;
Al.alGetSourcef(source, Al.AL_SEC_OFFSET, out pos);
return pos;
}
}
}
}