Skip to content

Commit

Permalink
Merge pull request #404 from AJenbo/sterio
Browse files Browse the repository at this point in the history
audsrv: Fix sterio calculations
  • Loading branch information
uyjulian authored Feb 11, 2023
2 parents 87061bf + e3118a2 commit 4620fc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ee/rpc/audsrv/src/audsrv_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int call_rpc_3(int func, int arg1, int arg2, int arg3)

sbuff[0] = arg1;
sbuff[1] = arg2;
sbuff[2] = arg2;
sbuff[2] = arg3;
SifCallRpc(&cd0, func, 0, sbuff, 3*4, sbuff, 4, NULL, NULL);

ret = sbuff[0];
Expand Down Expand Up @@ -420,9 +420,9 @@ int audsrv_adpcm_set_volume_and_pan(int ch, int volume, int pan)
int volumer = volume;

if (pan < 0)
volumer = volumer * -pan / 100;
volumer = volumer * (100 + pan) / 100;
else if (pan > 0)
volumel = volumel * pan / 100;
volumel = volumel * (100 - pan) / 100;

return call_rpc_3(AUDSRV_ADPCM_SET_VOLUME, ch, vol_values[volumel/4], vol_values[volumer/4]);
}
Expand Down

0 comments on commit 4620fc3

Please sign in to comment.