diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-28 13:08:55 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-28 13:08:55 +0000 |
commit | 4a0e50ba0cc5bd835aaf942b65149e9613aad86e (patch) | |
tree | db9aa24feb6bf3c1699a21b3271b280b90e02ce9 | |
parent | e5bdcfc8e584d2867d0ad7995d18bd30c7874d1b (diff) | |
download | usdx-4a0e50ba0cc5bd835aaf942b65149e9613aad86e.tar.gz usdx-4a0e50ba0cc5bd835aaf942b65149e9613aad86e.tar.xz usdx-4a0e50ba0cc5bd835aaf942b65149e9613aad86e.zip |
experimental positioning support added
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@753 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UAudioPlayback_Portaudio.pas | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Game/Code/Classes/UAudioPlayback_Portaudio.pas b/Game/Code/Classes/UAudioPlayback_Portaudio.pas index 36bebc8a..c2694e6d 100644 --- a/Game/Code/Classes/UAudioPlayback_Portaudio.pas +++ b/Game/Code/Classes/UAudioPlayback_Portaudio.pas @@ -46,9 +46,12 @@ type function GetLength(): real; override; function GetStatus(): TStreamStatus; override; - function ReadData(Buffer: PChar; BufSize: integer): integer; - function IsLoaded(): boolean; + + // functions delegated to the decode stream + function GetPosition: real; + procedure SetPosition(Time: real); + function ReadData(Buffer: PChar; BufSize: integer): integer; end; type @@ -269,6 +272,16 @@ begin end; end; +function TPortaudioPlaybackStream.GetPosition: real; +begin + result := decodeStream.Position; +end; + +procedure TPortaudioPlaybackStream.SetPosition(Time: real); +begin + decodeStream.Position := Time; +end; + { TAudioPlayback_Portaudio } |