sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
s_gcmv.c
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
11
#include "
libspu2_internal.h
"
12
13
void
SpuGetCommonMasterVolume(s16 *mvol_left, s16 *mvol_right)
14
{
15
const
vu16 *v2;
16
u16 v3;
17
u16 v4;
18
19
v2 = &_spu_RXX[20 * _spu_core];
20
v3 = v2[944];
21
v4 = v2[945];
22
if
( (v3 & 0x8000) != 0 )
23
v3 &= ~0xF000;
24
if
( (v2[945] & 0x8000) != 0 )
25
v4 &= ~0xF000;
26
if
( v3 < 0x4000u )
27
*mvol_left = v3;
28
else
29
*mvol_left = v3 + 0x8000;
30
if
( v4 < 0x4000u )
31
*mvol_right = v4;
32
else
33
*mvol_right = v4 + 0x8000;
34
}
libspu2_internal.h
core
libspu2
src
s_gcmv.c
Generated by
1.18.0