Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
pimpmobile
Commits
35a4a59f
Commit
35a4a59f
authored
Jun 03, 2009
by
Erik Faye-Lund
Browse files
rename final_period to period
Signed-off-by:
Erik Faye-Lund
<
kusmabite@gmail.com
>
parent
29eac55d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/pimp_channel_state.h
View file @
35a4a59f
...
...
@@ -31,7 +31,7 @@ struct pimp_channel_state
u8
volume_command
;
s32
note_period
;
s32
final_
period
;
s32
period
;
s8
volume
;
u8
pan
;
...
...
src/pimp_effects.h
View file @
35a4a59f
...
...
@@ -16,31 +16,31 @@ static void porta_up(struct pimp_channel_state *chan, s32 period_low_clamp)
{
ASSERT
(
chan
!=
0
);
chan
->
final_
period
-=
chan
->
porta_speed
;
if
(
chan
->
final_
period
<
period_low_clamp
)
chan
->
final_
period
=
period_low_clamp
;
chan
->
period
-=
chan
->
porta_speed
;
if
(
chan
->
period
<
period_low_clamp
)
chan
->
period
=
period_low_clamp
;
}
static
void
porta_down
(
struct
pimp_channel_state
*
chan
,
s32
period_high_clamp
)
{
ASSERT
(
chan
!=
0
);
chan
->
final_
period
+=
chan
->
porta_speed
;
if
(
chan
->
final_
period
>
period_high_clamp
)
chan
->
final_
period
=
period_high_clamp
;
chan
->
period
+=
chan
->
porta_speed
;
if
(
chan
->
period
>
period_high_clamp
)
chan
->
period
=
period_high_clamp
;
}
static
void
porta_note
(
struct
pimp_channel_state
*
chan
)
{
ASSERT
(
chan
!=
0
);
if
(
chan
->
final_
period
>
chan
->
porta_target
)
if
(
chan
->
period
>
chan
->
porta_target
)
{
chan
->
final_
period
-=
chan
->
porta_speed
;
if
(
chan
->
final_
period
<
chan
->
porta_target
)
chan
->
final_
period
=
chan
->
porta_target
;
chan
->
period
-=
chan
->
porta_speed
;
if
(
chan
->
period
<
chan
->
porta_target
)
chan
->
period
=
chan
->
porta_target
;
}
else
if
(
chan
->
final_
period
<
chan
->
porta_target
)
else
if
(
chan
->
period
<
chan
->
porta_target
)
{
chan
->
final_
period
+=
chan
->
porta_speed
;
if
(
chan
->
final_
period
>
chan
->
porta_target
)
chan
->
final_
period
=
chan
->
porta_target
;
chan
->
period
+=
chan
->
porta_speed
;
if
(
chan
->
period
>
chan
->
porta_target
)
chan
->
period
=
chan
->
porta_target
;
}
}
...
...
@@ -64,10 +64,10 @@ static void vibrato(struct pimp_channel_state *chan, s32 period_low_clamp, s32 p
-
180
,
-
161
,
-
141
,
-
120
,
-
97
,
-
74
,
-
49
,
-
24
};
chan
->
final_
period
=
chan
->
note_period
+
(
sine_waveform
[
chan
->
vibrato_counter
&
63
]
*
chan
->
vibrato_depth
)
/
32
;
chan
->
period
=
chan
->
note_period
+
(
sine_waveform
[
chan
->
vibrato_counter
&
63
]
*
chan
->
vibrato_depth
)
/
32
;
if
(
chan
->
final_
period
<
period_low_clamp
)
chan
->
final_
period
=
period_low_clamp
;
if
(
chan
->
final_
period
>
period_high_clamp
)
chan
->
final_
period
=
period_high_clamp
;
if
(
chan
->
period
<
period_low_clamp
)
chan
->
period
=
period_low_clamp
;
if
(
chan
->
period
>
period_high_clamp
)
chan
->
period
=
period_high_clamp
;
chan
->
vibrato_counter
+=
chan
->
vibrato_speed
;
}
...
...
src/pimp_render.c
View file @
35a4a59f
...
...
@@ -76,7 +76,7 @@ static void note_on(const struct pimp_mod_context *ctx, struct pimp_mixer_channe
chan
->
note_period
=
pimp_get_amiga_period
(((
s32
)
chan
->
note
)
+
chan
->
sample
->
rel_note
,
chan
->
sample
->
fine_tune
);
}
chan
->
final_
period
=
chan
->
note_period
;
chan
->
period
=
chan
->
note_period
;
}
}
...
...
@@ -454,11 +454,11 @@ static void pimp_mod_context_update_row(struct pimp_mod_context *ctx)
{
if
(
ctx
->
mod
->
flags
&
FLAG_LINEAR_PERIODS
)
{
mc
->
sample_cursor_delta
=
pimp_get_linear_delta
(
chan
->
final_
period
,
ctx
->
delta_scale
);
mc
->
sample_cursor_delta
=
pimp_get_linear_delta
(
chan
->
period
,
ctx
->
delta_scale
);
}
else
{
mc
->
sample_cursor_delta
=
pimp_get_amiga_delta
(
chan
->
final_
period
,
ctx
->
delta_scale
);
mc
->
sample_cursor_delta
=
pimp_get_amiga_delta
(
chan
->
period
,
ctx
->
delta_scale
);
}
}
...
...
@@ -625,11 +625,11 @@ static void pimp_mod_context_update_tick(struct pimp_mod_context *ctx)
{
if
(
ctx
->
mod
->
flags
&
FLAG_LINEAR_PERIODS
)
{
mc
->
sample_cursor_delta
=
pimp_get_linear_delta
(
chan
->
final_
period
,
ctx
->
delta_scale
);
mc
->
sample_cursor_delta
=
pimp_get_linear_delta
(
chan
->
period
,
ctx
->
delta_scale
);
}
else
{
mc
->
sample_cursor_delta
=
pimp_get_amiga_delta
(
chan
->
final_
period
,
ctx
->
delta_scale
);
mc
->
sample_cursor_delta
=
pimp_get_amiga_delta
(
chan
->
period
,
ctx
->
delta_scale
);
}
}
...
...
Write
Preview
Supports
Markdown
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