Add a streaming audio playback interface.

This allows audio to be streamed, rather than needed to be fully loaded into memory.
This commit is contained in:
RoosterDragon
2017-06-16 20:06:45 +01:00
committed by Paul Chote
parent 45606c9528
commit 85c948fd8d
5 changed files with 337 additions and 107 deletions

View File

@@ -87,8 +87,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (currentSong == null || musicPlaylist.CurrentSongIsBackground)
return "";
var minutes = (int)Game.Sound.MusicSeekPosition / 60;
var seconds = (int)Game.Sound.MusicSeekPosition % 60;
var seek = Game.Sound.MusicSeekPosition;
var minutes = (int)seek / 60;
var seconds = (int)seek % 60;
var totalMinutes = currentSong.Length / 60;
var totalSeconds = currentSong.Length % 60;