-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
145 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
libsnd_linked/build | ||
src | ||
asm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "libsnd_i.h" | ||
|
||
void _SsSndPlay(s16 arg0, s16 arg1) { _SsSeqPlay(arg0, arg1); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "libsnd_i.h" | ||
|
||
void SsSetMVol(short voll, short volr) { | ||
SpuCommonAttr attr; | ||
attr.mask = SPU_COMMON_MVOLL | SPU_COMMON_MVOLR; | ||
attr.mvol.left = 129 * voll; | ||
attr.mvol.right = 129 * volr; | ||
SpuSetCommonAttr(&attr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "libsnd_i.h" | ||
|
||
void SsSetSerialAttr(char arg0, char arg1, char arg2) { | ||
SpuCommonAttr attr; | ||
s32 temp_a0; | ||
s32 temp_a1; | ||
s32 temp_v1; | ||
|
||
if (!(arg0 & 0xFF)) { | ||
temp_v1 = arg1 & 0xFF; | ||
if (temp_v1 == 0) { | ||
attr.mask = 0x200; | ||
attr.cd.mix = arg2 & 0xFF; | ||
} | ||
if (temp_v1 == 1) { | ||
attr.mask = 0x100; | ||
attr.cd.reverb = arg2 & 0xFF; | ||
} | ||
} | ||
temp_a0 = arg0 & 0xFF; | ||
temp_a1 = arg1 & 0xFF; | ||
if (temp_a0 == 1) { | ||
if (temp_a1 == 0) { | ||
attr.mask = 0x2000; | ||
attr.ext.mix = arg2 & 0xFF; | ||
} | ||
if (temp_a1 == temp_a0) { | ||
attr.mask = 0x1000; | ||
attr.ext.reverb = arg2 & 0xFF; | ||
} | ||
} | ||
SpuSetCommonAttr(&attr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "libsnd_i.h" | ||
|
||
void SsSetSerialVol(char s_num, short voll, short volr) { | ||
SpuCommonAttr attr; | ||
if (s_num == 0) { | ||
attr.mask = 0xC0; | ||
if (voll >= 128) { | ||
voll = 127; | ||
} | ||
if (volr >= 128) { | ||
volr = 127; | ||
} | ||
attr.cd.volume.left = voll * 258; | ||
attr.cd.volume.right = volr * 258; | ||
} | ||
if (s_num == 1) { | ||
attr.mask = 0xC00; | ||
if (voll >= 128) { | ||
voll = 127; | ||
} | ||
if (volr >= 128) { | ||
volr = 127; | ||
} | ||
attr.ext.volume.left = voll * 258; | ||
attr.ext.volume.right = volr * 258; | ||
} | ||
SpuSetCommonAttr(&attr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "libsnd_i.h" | ||
|
||
void SsSeqCalledTbyT(void) { | ||
int i; | ||
int j; | ||
if (_snd_ev_flag != 1) { | ||
_snd_ev_flag = 1; | ||
|
||
SpuVmFlush(); | ||
|
||
/* For each SEP block */ | ||
for (i = 0; i < _snd_seq_s_max; i++) { | ||
/* Is it on? */ | ||
if ((1 << i) & _snd_openflag) { | ||
/* Go through each SEQ track */ | ||
for (j = 0; j < _snd_seq_t_max; j++) { | ||
if (_ss_score[i][j].unk90 & 1) { | ||
_SsSndPlay(i, j); | ||
|
||
if (_ss_score[i][j].unk90 & 0x10) { | ||
_SsSndCrescendo(i, j); | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 0x20) { | ||
_SsSndDecrescendo(i, j); | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 0x40) { | ||
_SsSndTempo(i, j); | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 0x80) { | ||
_SsSndTempo(i, j); | ||
} | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 2) { | ||
_SsSndPause(i, j); | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 8) { | ||
_SsSndReplay(i, j); | ||
} | ||
|
||
if (_ss_score[i][j].unk90 & 4) { | ||
_SsSndStop(i, j); | ||
_ss_score[i][j].unk90 = 0; | ||
} | ||
} | ||
} | ||
} | ||
_snd_ev_flag = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters