diff options
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; |