Audio: respect volume properly
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
316f2354d1
commit
d9e11a8296
1 changed files with 1 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ fn audioTick(entities: *mach.Entities.Mod, audio: *Mod) !void {
|
||||||
// Duplicate samples for mono sounds
|
// Duplicate samples for mono sounds
|
||||||
var i: usize = 0;
|
var i: usize = 0;
|
||||||
for (samples[index.*..][0..to_read]) |sample| {
|
for (samples[index.*..][0..to_read]) |sample| {
|
||||||
mixSamplesDuplicate(mixing_buffer.items[i..][0..player_channels], sample);
|
mixSamplesDuplicate(mixing_buffer.items[i..][0..player_channels], sample * volume);
|
||||||
i += player_channels;
|
i += player_channels;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue