mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-16 11:15:06 +00:00
Made Audio*/output return a minimum of 1 on a playing non-muted channel
This commit is contained in:
parent
e4416264e8
commit
ad4ff82138
1 changed files with 3 additions and 2 deletions
|
@ -85,10 +85,11 @@ Uint8
|
|||
apu_get_vu(Apu *c)
|
||||
{
|
||||
int i;
|
||||
Sint32 sum[2];
|
||||
Sint32 sum[2] = {0, 0};
|
||||
if(!c->advance || !c->period) return 0;
|
||||
for(i = 0; i < 2; ++i) {
|
||||
sum[i] = envelope(c, c->age) * c->volume[i] / 0x800;
|
||||
if(!c->volume[i]) continue;
|
||||
sum[i] = 1 + envelope(c, c->age) * c->volume[i] / 0x800;
|
||||
if(sum[i] > 0xf) sum[i] = 0xf;
|
||||
}
|
||||
return (sum[0] << 4) | sum[1];
|
||||
|
|
Loading…
Reference in a new issue