sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ut_cadsr.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
s16 SsUtChangeADSR(s16 vc, s16 vab_id, s16 prog, s16 old_note, u16 adsr1, u16 adsr2)
14
{
15
const
libsnd2_spu_voice_t *voice_struct;
16
17
if
( (u16)vc >= 24u )
18
return
-1;
19
voice_struct = &_svm_voice[vc];
20
if
( voice_struct->m_vab_id != vab_id || voice_struct->m_prog != prog || voice_struct->m_note != old_note )
21
{
22
return
-1;
23
}
24
_svm_sreg_buf[vc].m_adsr1 = adsr1;
25
_svm_sreg_buf[vc].m_adsr2 = adsr2;
26
_svm_sreg_dirty[vc] |= 0x30;
27
return
0;
28
}
libsnd2_internal.h
libsnd2
src
vm
ut_cadsr.c
Generated by
1.18.0