mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fixed sound stopping.
This commit is contained in:
parent
100ade6463
commit
ab192f794e
|
@ -137,13 +137,18 @@ public:
|
|||
channels[c].data->sustain_start >= 0 &&
|
||||
channels[c].tick >= channels[c].data->sustain_end)
|
||||
channels[c].tick = channels[c].data->sustain_start;
|
||||
if(channels[c].tick >= channels[c].data->num_samples)
|
||||
|
||||
if(channels[c].stop >= 0)
|
||||
channels[c].stop -= to_fill;
|
||||
if(channels[c].tick >= channels[c].data->num_samples ||
|
||||
channels[c].stop == 0)
|
||||
channels[c].data = 0;
|
||||
|
||||
channels[c].lerp -= to_fill;
|
||||
if(channels[c].lerp < 0)
|
||||
channels[c].lerp = -1;
|
||||
|
||||
|
||||
filled += to_fill;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue