11#include "libsnd2_internal.h"
13void SePitchBend(u8 vc, s16 arg1)
25 voice_struct = &_svm_voice[vc];
26 _svm_cur.m_fake_program = voice_struct->m_fake_program;
27 v8 = voice_struct->m_tone;
28 _svm_cur.m_voice_idx = vc;
30 tone = v8 + ((u8)_svm_cur.m_fake_program * 16);
35 v13 = arg1 * _svm_tn[tone].pbmin;
36 pbend = v13 / 127 + 127;
37 note = voice_struct->m_note + v13 / 127 - 1;
43 v10 = arg1 * _svm_tn[tone].pbmax;
44 note = voice_struct->m_note + v10 / 127;
47 _svm_sreg_buf[vc].m_pitch = note2pitch2(note, pbend);
48 _svm_sreg_dirty[vc] |= 4;