summaryrefslogtreecommitdiff
path: root/arm7/lib/src/SND_lfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm7/lib/src/SND_lfo.c')
-rw-r--r--arm7/lib/src/SND_lfo.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/arm7/lib/src/SND_lfo.c b/arm7/lib/src/SND_lfo.c
deleted file mode 100644
index 262c6d27..00000000
--- a/arm7/lib/src/SND_lfo.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "SND_lfo.h"
-
-#include "SND_util.h"
-#include "SND_exChannel.h"
-
-void SND_InitLfoParam(struct SNDLfoParam *lfoParam) {
- lfoParam->target = SND_LFO_PITCH;
- lfoParam->depth = 0;
- lfoParam->range = 1;
- lfoParam->speed = 16;
- lfoParam->delay = 0;
-}
-
-void SND_StartLfo(struct SNDLfo *lfo) {
- lfo->counter = 0;
- lfo->delayCounter = 0;
-}
-
-void SND_UpdateLfo(struct SNDLfo *lfo) {
- if (lfo->delayCounter < lfo->param.delay) {
- lfo->delayCounter++;
- } else {
- u32 tmp = lfo->counter;
- tmp += lfo->param.speed << 6;
- tmp >>= 8;
- while (tmp >= 0x80) {
- tmp -= 0x80;
- }
- lfo->counter += lfo->param.speed << 6;
- lfo->counter &= 0xFF;
- lfo->counter |= tmp << 8;
- }
-}
-
-int SND_GetLfoValue(struct SNDLfo *lfo) {
- if (lfo->param.depth == 0) {
- return 0;
- } else if (lfo->delayCounter < lfo->param.delay) {
- return 0;
- } else {
- return SND_SinIdx((s32)((u32)lfo->counter >> 8)) * lfo->param.depth * lfo->param.range;
- }
-}