sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ut_ako.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 "
libsnd2_internal.h
"
12
13
void
SsUtAllKeyOff(s16 mode)
14
{
15
int
vc_index;
16
SpuVoiceAttr voice_attr;
17
18
(void)mode;
19
20
voice_attr.mask =
21
SPU_VOICE_VOLL | SPU_VOICE_VOLR | SPU_VOICE_PITCH | SPU_VOICE_WDSA | SPU_VOICE_ADSR_ADSR1 | SPU_VOICE_ADSR_ADSR2;
22
voice_attr.pitch = 0x1000;
23
voice_attr.addr = 0x5000;
24
voice_attr.adsr1 = 0x80FF;
25
voice_attr.volume.left = 0;
26
voice_attr.volume.right = 0;
27
voice_attr.adsr2 = 0x4000;
28
for
( vc_index = 0; vc_index < _SsVmMaxVoice; vc_index += 1 )
29
{
30
if
( (_snd_vmask & (1 << vc_index)) == 0 )
31
{
32
libsnd2_spu_voice_t *voice_struct;
33
34
voice_struct = &_svm_voice[vc_index];
35
voice_struct->m_unk02 = 24;
36
voice_struct->m_key_stat = 0;
37
voice_struct->m_seq_sep_no = 255;
38
voice_struct->m_fake_program = 0;
39
voice_struct->m_prog = 0;
40
voice_struct->m_tone = 255;
41
voice_struct->m_voll2 = 0;
42
voice_attr.voice = 1 << vc_index;
43
SpuSetVoiceAttr(&voice_attr);
44
_svm_cur.m_voice_idx = vc_index;
45
_SsVmKeyOffNow();
46
}
47
}
48
}
libsnd2_internal.h
libsnd2
src
vm
ut_ako.c
Generated by
1.18.0