mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
2nd part of FS#12176. Tempo setting migrated to fixed point for libgme.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30274 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
964a5e6dfb
commit
012df14a5f
21 changed files with 71 additions and 69 deletions
|
@ -54,7 +54,7 @@ void Ay_init( struct Ay_Emu *this )
|
|||
{
|
||||
this->sample_rate = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo = 1.0;
|
||||
this->tempo = (int)FP_ONE_TEMPO;
|
||||
this->gain = 1.0;
|
||||
this->track_count = 0;
|
||||
|
||||
|
@ -343,11 +343,11 @@ void Sound_mute_voices( struct Ay_Emu *this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Ay_Emu *this, double t )
|
||||
void Sound_set_tempo( struct Ay_Emu *this, int t )
|
||||
{
|
||||
require( this->sample_rate ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo = t;
|
||||
|
@ -356,7 +356,7 @@ void Sound_set_tempo( struct Ay_Emu *this, double t )
|
|||
if ( this->clock_rate_ != spectrum_clock )
|
||||
p = this->clock_rate_ / 50;
|
||||
|
||||
this->play_period = (blip_time_t) (p / t);
|
||||
this->play_period = (blip_time_t) ((p * FP_ONE_TEMPO) / t);
|
||||
}
|
||||
|
||||
void fill_buf( struct Ay_Emu *this ) ICODE_ATTR;;
|
||||
|
|
|
@ -65,7 +65,7 @@ struct Ay_Emu {
|
|||
int max_initial_silence;
|
||||
int voice_count;
|
||||
int mute_mask_;
|
||||
double tempo;
|
||||
int tempo;
|
||||
double gain;
|
||||
|
||||
long sample_rate;
|
||||
|
@ -141,7 +141,7 @@ long Track_get_length( struct Ay_Emu* this, int n );
|
|||
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Ay_Emu* this, double t );
|
||||
void Sound_set_tempo( struct Ay_Emu* this, int t );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Ay_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#include "codeclib.h"
|
||||
#endif
|
||||
|
||||
// common defines
|
||||
#define FP_ONE_TEMPO (1LL <<16)
|
||||
|
||||
#if 1 /* IRAM configuration is not yet active for all libGME codecs. */
|
||||
#undef ICODE_ATTR
|
||||
#define ICODE_ATTR
|
||||
|
|
|
@ -152,11 +152,11 @@ void Apu_reset( struct Gb_Apu* this, enum gb_mode_t mode, bool agb_wave )
|
|||
}
|
||||
}
|
||||
|
||||
void Apu_set_tempo( struct Gb_Apu* this, double t )
|
||||
void Apu_set_tempo( struct Gb_Apu* this, int t )
|
||||
{
|
||||
this->frame_period = 4194304 / 512; // 512 Hz
|
||||
if ( t != 1.0 )
|
||||
this->frame_period = t ? (blip_time_t) (this->frame_period / t) : (blip_time_t) (0);
|
||||
if ( t != (int)FP_ONE_TEMPO )
|
||||
this->frame_period = t ? (blip_time_t) ((this->frame_period * FP_ONE_TEMPO) / t) : (blip_time_t) (0);
|
||||
}
|
||||
|
||||
void Apu_init( struct Gb_Apu* this )
|
||||
|
@ -184,7 +184,7 @@ void Apu_init( struct Gb_Apu* this )
|
|||
}
|
||||
|
||||
this->reduce_clicks_ = false;
|
||||
Apu_set_tempo( this, 1.0 );
|
||||
Apu_set_tempo( this, (int)FP_ONE_TEMPO );
|
||||
this->volume_ = 1.0;
|
||||
Apu_reset( this, mode_cgb, false );
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ void Apu_reduce_clicks( struct Gb_Apu* this, bool reduce );
|
|||
|
||||
// Sets frame sequencer rate, where 1.0 is normal. Meant for adjusting the
|
||||
// tempo in a music player.
|
||||
void Apu_set_tempo( struct Gb_Apu* this, double t );
|
||||
void Apu_set_tempo( struct Gb_Apu* this, int t );
|
||||
|
||||
|
||||
void write_osc( struct Gb_Apu* this, int reg, int old_data, int data ) ICODE_ATTR;
|
||||
|
|
|
@ -46,7 +46,7 @@ void Gbs_init( struct Gbs_Emu* this )
|
|||
{
|
||||
this->sample_rate_ = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo_ = 1.0;
|
||||
this->tempo_ = (int)(FP_ONE_TEMPO);
|
||||
|
||||
// Unload
|
||||
this->header.timer_mode = 0;
|
||||
|
@ -304,16 +304,16 @@ void Sound_mute_voices( struct Gbs_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Gbs_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Gbs_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate_ ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo_ = t;
|
||||
|
||||
this->tempo = (int) (tempo_unit / t + 0.5 );
|
||||
this->tempo = (int) ((tempo_unit * FP_ONE_TEMPO) / t);
|
||||
Apu_set_tempo( &this->apu, t );
|
||||
Update_timer( this );
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ struct Gbs_Emu {
|
|||
unsigned buf_changed_count;
|
||||
int voice_count_;
|
||||
double gain_;
|
||||
double tempo_;
|
||||
int tempo_;
|
||||
|
||||
// track-specific
|
||||
byte track_count;
|
||||
|
@ -158,7 +158,7 @@ static inline long Track_get_length( struct Gbs_Emu* this, int n )
|
|||
// Sound customization
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Gbs_Emu* this, double );
|
||||
void Sound_set_tempo( struct Gbs_Emu* this, int );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Gbs_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -49,7 +49,7 @@ void Hes_init( struct Hes_Emu* this )
|
|||
{
|
||||
this->sample_rate_ = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo_ = 1.0;
|
||||
this->tempo_ = (int)(FP_ONE_TEMPO);
|
||||
|
||||
// defaults
|
||||
this->max_initial_silence = 2;
|
||||
|
@ -544,15 +544,15 @@ void Sound_mute_voices( struct Hes_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Hes_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Hes_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate_ ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->play_period = (hes_time_t) (period_60hz / t);
|
||||
this->timer_base = (int) (1024 / t);
|
||||
this->play_period = (hes_time_t) ((period_60hz*FP_ONE_TEMPO) / t);
|
||||
this->timer_base = (int) ((1024*FP_ONE_TEMPO) / t);
|
||||
recalc_timer_load( this );
|
||||
this->tempo_ = t;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ struct Hes_Emu {
|
|||
long sample_rate_;
|
||||
unsigned buf_changed_count;
|
||||
int voice_count_;
|
||||
double tempo_;
|
||||
int tempo_;
|
||||
double gain_;
|
||||
|
||||
// track-specific
|
||||
|
@ -168,7 +168,7 @@ static inline long Track_get_length( struct Hes_Emu* this, int n )
|
|||
// Sound customization
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Hes_Emu* this, double );
|
||||
void Sound_set_tempo( struct Hes_Emu* this, int );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Hes_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -53,7 +53,7 @@ void Kss_init( struct Kss_Emu* this )
|
|||
{
|
||||
this->sample_rate = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo = 1.0;
|
||||
this->tempo = (int)(FP_ONE_TEMPO);
|
||||
this->gain = 1.0;
|
||||
this->chip_flags = 0;
|
||||
|
||||
|
@ -509,18 +509,18 @@ void Sound_mute_voices( struct Kss_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Kss_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Kss_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo = t;
|
||||
|
||||
blip_time_t period =
|
||||
(this->header.device_flags & 0x40 ? clock_rate / 50 : clock_rate / 60);
|
||||
this->play_period = (blip_time_t) (period / t);
|
||||
this->play_period = (blip_time_t) ((period * FP_ONE_TEMPO) / t);
|
||||
}
|
||||
|
||||
void fill_buf( struct Kss_Emu* this );
|
||||
|
|
|
@ -97,7 +97,7 @@ struct Kss_Emu {
|
|||
int max_initial_silence;
|
||||
int voice_count;
|
||||
int mute_mask_;
|
||||
double tempo;
|
||||
int tempo;
|
||||
double gain;
|
||||
|
||||
long sample_rate;
|
||||
|
@ -192,7 +192,7 @@ static inline long Track_get_length( struct Kss_Emu* this, int n )
|
|||
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Kss_Emu* this, double t );
|
||||
void Sound_set_tempo( struct Kss_Emu* this, int t );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Kss_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -19,7 +19,7 @@ int const amp_range = 15;
|
|||
|
||||
void Apu_init( struct Nes_Apu* this )
|
||||
{
|
||||
this->tempo_ = 1.0;
|
||||
this->tempo_ = (int)(FP_ONE_TEMPO);
|
||||
this->dmc.apu = this;
|
||||
this->dmc.prg_reader = NULL;
|
||||
this->irq_notifier_ = NULL;
|
||||
|
@ -77,12 +77,12 @@ void Apu_output( struct Nes_Apu* this, struct Blip_Buffer* buffer )
|
|||
Apu_osc_output( this, i, buffer );
|
||||
}
|
||||
|
||||
void Apu_set_tempo( struct Nes_Apu* this, double t )
|
||||
void Apu_set_tempo( struct Nes_Apu* this, int t )
|
||||
{
|
||||
this->tempo_ = t;
|
||||
this->frame_period = (this->dmc.pal_mode ? 8314 : 7458);
|
||||
if ( t != 1.0 )
|
||||
this->frame_period = (int) (this->frame_period / t) & ~1; // must be even
|
||||
if ( t != (int)FP_ONE_TEMPO )
|
||||
this->frame_period = (int) ((this->frame_period * FP_ONE_TEMPO) / t) & ~1; // must be even
|
||||
}
|
||||
|
||||
void Apu_reset( struct Nes_Apu* this, bool pal_mode, int initial_dmc_dac )
|
||||
|
|
|
@ -28,7 +28,7 @@ struct Nes_Apu {
|
|||
struct Nes_Triangle triangle;
|
||||
struct Nes_Dmc dmc;
|
||||
|
||||
double tempo_;
|
||||
int tempo_;
|
||||
nes_time_t last_time; // has been run until this time in current frame
|
||||
nes_time_t earliest_irq_;
|
||||
nes_time_t next_irq;
|
||||
|
@ -74,7 +74,7 @@ void Apu_end_frame( struct Nes_Apu* this, nes_time_t ) ICODE_ATTR;
|
|||
void Apu_reset( struct Nes_Apu* this, bool pal_mode, int initial_dmc_dac );
|
||||
|
||||
// Adjust frame period
|
||||
void Apu_set_tempo( struct Nes_Apu* this, double );
|
||||
void Apu_set_tempo( struct Nes_Apu* this, int );
|
||||
|
||||
// Set overall volume (default is 1.0)
|
||||
void Apu_volume( struct Nes_Apu* this, double );
|
||||
|
|
|
@ -108,12 +108,12 @@ void Fds_write_( struct Nes_Fds_Apu* this, unsigned addr, int data )
|
|||
}
|
||||
}
|
||||
|
||||
void Fds_set_tempo( struct Nes_Fds_Apu* this, double t )
|
||||
void Fds_set_tempo( struct Nes_Fds_Apu* this, int t )
|
||||
{
|
||||
this->lfo_tempo = lfo_base_tempo;
|
||||
if ( t != 1.0 )
|
||||
if ( t != (int)FP_ONE_TEMPO )
|
||||
{
|
||||
this->lfo_tempo = (int) ((double) lfo_base_tempo / t + 0.5);
|
||||
this->lfo_tempo = (int) ((lfo_base_tempo * FP_ONE_TEMPO) / t);
|
||||
if ( this->lfo_tempo <= 0 )
|
||||
this->lfo_tempo = 1;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ struct Nes_Fds_Apu {
|
|||
// init
|
||||
void Fds_init( struct Nes_Fds_Apu* this );
|
||||
// setup
|
||||
void Fds_set_tempo( struct Nes_Fds_Apu* this, double t );
|
||||
void Fds_set_tempo( struct Nes_Fds_Apu* this, int t );
|
||||
|
||||
// emulation
|
||||
void Fds_reset( struct Nes_Fds_Apu* this );
|
||||
|
|
|
@ -54,7 +54,7 @@ void Nsf_init( struct Nsf_Emu* this )
|
|||
{
|
||||
this->sample_rate = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo = 1.0;
|
||||
this->tempo = (int)(FP_ONE_TEMPO);
|
||||
this->gain = 1.0;
|
||||
|
||||
// defaults
|
||||
|
@ -474,16 +474,16 @@ void Sound_mute_voices( struct Nsf_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Nsf_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Nsf_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo = t;
|
||||
|
||||
set_play_period( this, (int) (play_period( &this->header ) / t) );
|
||||
set_play_period( this, (int) ((play_period( &this->header ) * FP_ONE_TEMPO) / t) );
|
||||
|
||||
Apu_set_tempo( &this->apu, t );
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ struct Nsf_Emu {
|
|||
int max_initial_silence;
|
||||
int voice_count;
|
||||
int mute_mask_;
|
||||
double tempo;
|
||||
int tempo;
|
||||
double gain;
|
||||
|
||||
long sample_rate;
|
||||
|
@ -189,7 +189,7 @@ long Track_length( struct Nsf_Emu* this, int n );
|
|||
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Nsf_Emu* this, double t );
|
||||
void Sound_set_tempo( struct Nsf_Emu* this, int t );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Nsf_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -46,7 +46,7 @@ void Sgc_init( struct Sgc_Emu* this )
|
|||
|
||||
this->sample_rate = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo = 1.0;
|
||||
this->tempo = (int)FP_ONE_TEMPO;
|
||||
this->gain = 1.0;
|
||||
this->voice_count = 0;
|
||||
|
||||
|
@ -294,16 +294,16 @@ void Sound_mute_voices( struct Sgc_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Sgc_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Sgc_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo = t;
|
||||
|
||||
this->play_period = (int) (clock_rate( this ) / (this->header.rate ? 50 : 60) / t);
|
||||
this->play_period = (int) ((clock_rate( this ) * FP_ONE_TEMPO) / (this->header.rate ? 50 : 60) / t);
|
||||
}
|
||||
|
||||
void fill_buf( struct Sgc_Emu* this ) ICODE_ATTR;
|
||||
|
|
|
@ -66,7 +66,7 @@ struct Sgc_Emu {
|
|||
// general
|
||||
int voice_count;
|
||||
int mute_mask_;
|
||||
double tempo;
|
||||
int tempo;
|
||||
double gain;
|
||||
|
||||
long sample_rate;
|
||||
|
@ -166,7 +166,7 @@ static inline long Track_get_length( struct Sgc_Emu* this, int n )
|
|||
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Sgc_Emu* this, double t );
|
||||
void Sound_set_tempo( struct Sgc_Emu* this, int t );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Sgc_Emu* this, int index, bool mute );
|
||||
|
|
|
@ -76,7 +76,7 @@ void Vgm_init( struct Vgm_Emu* this )
|
|||
{
|
||||
this->sample_rate = 0;
|
||||
this->mute_mask_ = 0;
|
||||
this->tempo = 1.0;
|
||||
this->tempo = (int)(FP_ONE_TEMPO);
|
||||
|
||||
// defaults
|
||||
this->max_initial_silence = 2;
|
||||
|
@ -288,7 +288,7 @@ blargg_err_t Vgm_load_mem( struct Vgm_Emu* this, byte const* new_data, long new_
|
|||
Ym2612_enable( &this->ym2612, false );
|
||||
Ym2413_enable( &this->ym2413, false );
|
||||
|
||||
Sound_set_tempo( this, 1 );
|
||||
Sound_set_tempo( this, (int)(FP_ONE_TEMPO) );
|
||||
|
||||
this->voice_count = sms_osc_count;
|
||||
|
||||
|
@ -733,27 +733,26 @@ void Sound_mute_voices( struct Vgm_Emu* this, int mask )
|
|||
}
|
||||
}
|
||||
|
||||
void Sound_set_tempo( struct Vgm_Emu* this, double t )
|
||||
void Sound_set_tempo( struct Vgm_Emu* this, int t )
|
||||
{
|
||||
require( this->sample_rate ); // sample rate must be set first
|
||||
double const min = 0.02;
|
||||
double const max = 4.00;
|
||||
int const min = (int)(FP_ONE_TEMPO*0.02);
|
||||
int const max = (int)(FP_ONE_TEMPO*4.00);
|
||||
if ( t < min ) t = min;
|
||||
if ( t > max ) t = max;
|
||||
this->tempo = t;
|
||||
|
||||
if ( this->file_begin )
|
||||
{
|
||||
this->vgm_rate = (long) (44100 * t + 0.5);
|
||||
this->blip_time_factor = (int) ((double)
|
||||
(1 << blip_time_bits) / this->vgm_rate * Blip_clock_rate( &this->stereo_buf.bufs [0] ) + 0.5);
|
||||
this->vgm_rate = (long) ((44100LL * t) / FP_ONE_TEMPO);
|
||||
this->blip_time_factor = (int) (((1LL << blip_time_bits) * Blip_clock_rate( &this->stereo_buf.bufs [0] )) / this->vgm_rate);
|
||||
//debug_printf( "blip_time_factor: %ld\n", blip_time_factor );
|
||||
//debug_printf( "vgm_rate: %ld\n", vgm_rate );
|
||||
// TODO: remove? calculates vgm_rate more accurately (above differs at most by one Hz only)
|
||||
//blip_time_factor = (long) floor( double (1L << blip_time_bits) * psg_rate / 44100 / t + 0.5 );
|
||||
//vgm_rate = (long) floor( double (1L << blip_time_bits) * psg_rate / blip_time_factor + 0.5 );
|
||||
|
||||
this->fm_time_factor = 2 + (int) (this->fm_rate * (1 << fm_time_bits) / this->vgm_rate + 0.5);
|
||||
this->fm_time_factor = 2 + (int) ((this->fm_rate * (1LL << fm_time_bits)) / this->vgm_rate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ struct Vgm_Emu {
|
|||
int max_initial_silence;
|
||||
int voice_count;
|
||||
int mute_mask_;
|
||||
double tempo;
|
||||
int tempo;
|
||||
double gain;
|
||||
|
||||
long sample_rate;
|
||||
|
@ -190,7 +190,7 @@ static inline long Track_get_length( struct Vgm_Emu* this )
|
|||
|
||||
// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
|
||||
// Track length as returned by track_info() assumes a tempo of 1.0.
|
||||
void Sound_set_tempo( struct Vgm_Emu* this, double t );
|
||||
void Sound_set_tempo( struct Vgm_Emu* this, int t );
|
||||
|
||||
// Mute/unmute voice i, where voice 0 is first voice
|
||||
void Sound_mute_voice( struct Vgm_Emu* this, int index, bool mute );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue