Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
pimpmobile
Commits
d4c29627
Commit
d4c29627
authored
May 20, 2009
by
Erik Faye-Lund
Browse files
rename CHANNELS to PIMP_CHANNEL_COUNT
Signed-off-by:
Erik Faye-Lund
<
kusmabite@gmail.com
>
parent
084af77a
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/pimp_config.h
View file @
d4c29627
...
...
@@ -7,7 +7,7 @@
#define PIMP_CONFIG_H
/* 32 is the maximum amount of channels in fasttracker2. a nice default. */
#define CHANNEL
S
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 */
...
...
src/pimp_mixer.c
View file @
d4c29627
...
...
@@ -11,7 +11,7 @@ void pimp_mixer_reset(struct pimp_mixer *mixer)
u32
c
;
ASSERT
(
mixer
!=
NULL
);
for
(
c
=
0
;
c
<
CHANNEL
S
;
++
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
<
CHANNEL
S
;
++
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
))
...
...
src/pimp_mixer.h
View file @
d4c29627
...
...
@@ -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
[
CHANNEL
S
];
struct
pimp_mixer_channel_state
channels
[
PIMP_
CHANNEL
_COUNT
];
s32
*
mix_buffer
;
};
...
...
src/pimp_mod_context.c
View file @
d4c29627
...
...
@@ -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
<
CHANNEL
S
;
++
i
)
for
(
i
=
0
;
i
<
PIMP_
CHANNEL
_COUNT
;
++
i
)
{
struct
pimp_channel_state
*
chan
=
&
ctx
->
channels
[
i
];
chan
->
instrument
=
(
const
struct
pimp_instrument
*
)
NULL
;
...
...
src/pimp_mod_context.h
View file @
d4c29627
...
...
@@ -38,7 +38,7 @@ struct pimp_mod_context
struct
pimp_pattern
*
curr_pattern
;
struct
pimp_pattern
*
next_pattern
;
struct
pimp_channel_state
channels
[
CHANNEL
S
];
struct
pimp_channel_state
channels
[
PIMP_
CHANNEL
_COUNT
];
const
u8
*
sample_bank
;
const
pimp_module
*
mod
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment