1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41:
| procedure TDisplay.RenderWave (HWND : THandle; WaveData : TWaveData; posTime : Integer); var i,y :LongInt; a : Single; LCh, RCh : SmallInt; X, Rd : Integer; Angle : Single; R, L : SmallInt; Rect: integer; begin Buffer.Canvas.Pen.Color := clBlack; Buffer.Canvas.Brush.Color := clBlack; Buffer.Canvas.Brush.Style := bsSolid; Buffer.Canvas.CopyRect( Rect(0, 0, 222, 56), EQBitmap.Canvas, Rect(0, 0, 222 0, 56 + 0));
Buffer.Canvas.MoveTo(0,15); Buffer.Canvas.Pen.Color := ColorPal[0];
for i := 0 to 239 do begin LCh := LOWORD(WaveData[i * 2]); RCh := HIWORD(WaveData[i * 2]); y := (LCh + RCh) div 2; y := Trunc((Y/32000) * 50);
Buffer.Canvas.Pen.Color := PaletteBitmap.Canvas.Pixels[0, 10]; Buffer.Canvas.MoveTo(i, 50); VBuffer.Canvas.LineTo(i, 50 - y); Buffer.Canvas.Pixels[i, 50 - y] := ColorPal[5]; Buffer.Canvas.LineTo(i, 50 - y);
Buffer.Canvas.Pen.Color := PaletteBitmap.Canvas.Pixels[0, 10]; Buffer.Canvas.MoveTo(i, 50); Buffer.Canvas.LineTo(i, 50 + y); Buffer.Canvas.Pixels[i, 50 - y] := ColorPal[5]; Buffer.Canvas.LineTo(i, 50 - y); end; VideoBuffer.Canvas.Pen.Color := clBlack; Buffer.Canvas.Brush.Color := clBlack; Buffer.Canvas.Brush.Style := bsSolid; Buffer.Canvas.CopyRect( Rect(0, 0, 222, 56), MainEQBitmap.Canvas, Rect(0, 0, 222 + 0, 56 + 0)); BitBlt(HWND, 0, 0, 222, 56, VideoBuffer.Canvas.Handle, 0, 0, srccopy) end; |