Commit d4c29627 authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

rename CHANNELS to PIMP_CHANNEL_COUNT


Signed-off-by: default avatarErik Faye-Lund <kusmabite@gmail.com>
parent 084af77a
......@@ -7,7 +7,7 @@
#define PIMP_CONFIG_H
/* 32 is the maximum amount of channels in fasttracker2. a nice default. */
#define CHANNELS 32
#define PIMP_CHANNEL_COUNT 32
/* check the sample-rate calculator at http://www.pineight.com/gba/samplerates/ for more glitch-free samplerates */
/* 0x4000100 = 0xFFFF, 0x4000102 = 0x0083 */
......
......@@ -11,7 +11,7 @@ void pimp_mixer_reset(struct pimp_mixer *mixer)
u32 c;
ASSERT(mixer != NULL);
for (c = 0; c < CHANNELS; ++c)
for (c = 0; c < PIMP_CHANNEL_COUNT; ++c)
{
mixer->channels[c].sample_data = 0;
mixer->channels[c].sample_cursor = 0;
......@@ -233,7 +233,7 @@ void pimp_mixer_mix(struct pimp_mixer *mixer, s8 *target, int samples)
pimp_mixer_clear(mixer->mix_buffer, samples);
dc_offs = 0;
for (c = 0; c < CHANNELS; ++c)
for (c = 0; c < PIMP_CHANNEL_COUNT; ++c)
{
struct pimp_mixer_channel_state *chan = &mixer->channels[c];
if ((NULL != chan->sample_data) && (chan->volume > 0))
......
......@@ -36,7 +36,7 @@ int pimp_mixer_detect_loop_event(const struct pimp_mixer_channel_state *chan, in
struct pimp_mixer
{
struct pimp_mixer_channel_state channels[CHANNELS];
struct pimp_mixer_channel_state channels[PIMP_CHANNEL_COUNT];
s32 *mix_buffer;
};
......
......@@ -38,7 +38,7 @@ void pimp_mod_context_init(struct pimp_mod_context *ctx, const pimp_module *mod,
ctx->curr_tempo = mod->tempo;
ctx->curr_tick = ctx->curr_tempo; /* make sure we skip to the next row right away */
for (i = 0; i < CHANNELS; ++i)
for (i = 0; i < PIMP_CHANNEL_COUNT; ++i)
{
struct pimp_channel_state *chan = &ctx->channels[i];
chan->instrument = (const struct pimp_instrument*)NULL;
......
......@@ -38,7 +38,7 @@ struct pimp_mod_context
struct pimp_pattern *curr_pattern;
struct pimp_pattern *next_pattern;
struct pimp_channel_state channels[CHANNELS];
struct pimp_channel_state channels[PIMP_CHANNEL_COUNT];
const u8 *sample_bank;
const pimp_module *mod;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment