summaryrefslogtreecommitdiff
path: root/arm7/lib/src/SND_wave.c
blob: 75d84e5fcaddca5c4a2e8e3bd1fe67a1258b3532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "SND_wave.h"

#include "SND.h"
#include "SND_work.h"

void SND_InvalidateWave(void *start, void *end) {
    for (u8 i = 0; i < SND_CHANNEL_COUNT; i++) {
        struct SNDExChannel *chn = &SNDi_Work.channels[i];

        if (chn->flags.active && chn->type == 0 && start <= chn->waveDataPtr && chn->waveDataPtr <= end) {
            chn->flags.start = FALSE;
            SND_StopChannel(i, 0);
        }
    }
}