diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-15 18:52:50 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-15 18:52:50 +0000 |
commit | ce4b2cba82398577edf04cce8abccf95bd93ea32 (patch) | |
tree | ceff3a1a4ba7aac01c32ed239295136faac5c100 /Game/Code/Classes/UDraw.pas | |
parent | 0a2abc145a59bfb2b0e0402a86115fa2da53c681 (diff) | |
download | usdx-ce4b2cba82398577edf04cce8abccf95bd93ea32.tar.gz usdx-ce4b2cba82398577edf04cce8abccf95bd93ea32.tar.xz usdx-ce4b2cba82398577edf04cce8abccf95bd93ea32.zip |
Race-Conditions fixed in recording stuff.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1267 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index e405ec07..ff0920f5 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -173,13 +173,17 @@ begin; MaxX := W-1; MaxY := (H-1) / 2; + Sound.LockAnalysisBuffer(); + glBegin(GL_LINE_STRIP); - for SampleIndex := 0 to High(Sound.BufferArray) do + for SampleIndex := 0 to High(Sound.AnalysisBuffer) do begin - glVertex2f(X + MaxX * SampleIndex/High(Sound.BufferArray), - Y + MaxY * (1 - Sound.BufferArray[SampleIndex]/-Low(Smallint))); + glVertex2f(X + MaxX * SampleIndex/High(Sound.AnalysisBuffer), + Y + MaxY * (1 - Sound.AnalysisBuffer[SampleIndex]/-Low(Smallint))); end; glEnd; + + Sound.UnlockAnalysisBuffer(); end; |