@@ -157,7 +157,6 @@ implementation |
| 157 |
uses vars, bass; |
157 |
uses vars, bass; |
| 158 |
|
158 |
|
| 159 |
const |
159 |
const |
| 160 |
VolumeDecreaseCoeff = 1; // It's really loud otherwise... |
|
|
| 161 |
playbackFrequency = 44100; |
160 |
playbackFrequency = 44100; |
| 162 |
sampleCycles: longint = (8192 * 1024) div playbackFrequency; |
161 |
sampleCycles: longint = (8192 * 1024) div playbackFrequency; |
| 163 |
TooFullThreshold: DWORD = (playbackFrequency div 10)*sizeof(single); //0.1s |
162 |
TooFullThreshold: DWORD = (playbackFrequency div 10)*sizeof(single); //0.1s |
@@ -234,8 +233,8 @@ begin |
| 234 |
Inc(bufCycles, cycles); |
233 |
Inc(bufCycles, cycles); |
| 235 |
if bufCycles >= sampleCycles then |
234 |
if bufCycles >= sampleCycles then |
| 236 |
begin |
235 |
begin |
| 237 |
buf[0] := ((bufRVal div sampleCycles) / 512.0)/VolumeDecreaseCoeff; |
236 |
buf[0] := ((bufRVal div sampleCycles) / 512.0); |
| 238 |
buf[1] := ((bufLVal div sampleCycles) / 512.0)/VolumeDecreaseCoeff; |
237 |
buf[1] := ((bufLVal div sampleCycles) / 512.0); |
| 239 |
bufCycles := 0; |
238 |
bufCycles := 0; |
| 240 |
bufLVal := 0; |
239 |
bufLVal := 0; |
| 241 |
bufRVal := 0; |
240 |
bufRVal := 0; |