diff options
| author | Max Horn | 2004-10-17 17:12:35 +0000 | 
|---|---|---|
| committer | Max Horn | 2004-10-17 17:12:35 +0000 | 
| commit | 649eb19a3ed45dbea8b2796a57190ff18534fffe (patch) | |
| tree | 7c2925e413170c8e3c74bf7bd99545f446f6bb3c /backends/midi | |
| parent | 9f4bf02c1ea5e1d899172dcf697a196252dceb18 (diff) | |
| download | scummvm-rg350-649eb19a3ed45dbea8b2796a57190ff18534fffe.tar.gz scummvm-rg350-649eb19a3ed45dbea8b2796a57190ff18534fffe.tar.bz2 scummvm-rg350-649eb19a3ed45dbea8b2796a57190ff18534fffe.zip | |
Cleanup
svn-id: r15588
Diffstat (limited to 'backends/midi')
| -rw-r--r-- | backends/midi/adlib.cpp | 11 | ||||
| -rw-r--r-- | backends/midi/ym2612.cpp | 4 | 
2 files changed, 5 insertions, 10 deletions
| diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp index 43baee673c..f702ee6532 100644 --- a/backends/midi/adlib.cpp +++ b/backends/midi/adlib.cpp @@ -626,7 +626,6 @@ private:  	AdlibVoice *allocate_voice(byte pri); -	void reset_tick();  	void mc_off(AdlibVoice * voice);  	static void link_mc(AdlibPart *part, AdlibVoice *voice); @@ -863,14 +862,14 @@ int MidiDriver_ADLIB::open() {  	_adlib_reg_cache = (byte *)calloc(256, 1); -	_opl = makeAdlibOPL(_mixer->getOutputRate()); +	_opl = makeAdlibOPL(getRate());  	adlib_write(1, 0x20);  	adlib_write(8, 0x40);  	adlib_write(0xBD, 0x00);  	create_lookup_table(); -	_samples_per_tick = (_mixer->getOutputRate() << FIXP_SHIFT) / BASE_FREQ; +	_samples_per_tick = (getRate() << FIXP_SHIFT) / BASE_FREQ;  	_mixer->setupPremix(this); @@ -1027,17 +1026,13 @@ void MidiDriver_ADLIB::generate_samples(int16 *data, int len) {  			if (_timer_proc)  				(*_timer_proc)(_timer_param);  			on_timer(); -			reset_tick(); +			_next_tick += _samples_per_tick;  		}  		data += step;  		len -= step;  	} while (len);  } -void MidiDriver_ADLIB::reset_tick() { -	_next_tick += _samples_per_tick; -} -  void MidiDriver_ADLIB::on_timer() {  	AdlibVoice *voice;  	int i; diff --git a/backends/midi/ym2612.cpp b/backends/midi/ym2612.cpp index f701a1541e..50f786b011 100644 --- a/backends/midi/ym2612.cpp +++ b/backends/midi/ym2612.cpp @@ -742,7 +742,7 @@ _mixer(mixer) {  	_timer_proc = 0;  	_timer_param = 0;  	_next_tick = 0; -	_samples_per_tick = (_mixer->getOutputRate() << FIXP_SHIFT) / BASE_FREQ; +	_samples_per_tick = (getRate() << FIXP_SHIFT) / BASE_FREQ;  	_next_voice = 0;  	createLookupTables(); @@ -750,7 +750,7 @@ _mixer(mixer) {  	int i;  	for (i = 0; i < ARRAYSIZE(_channel); i++)  		_channel[i] = new MidiChannel_YM2612; -	rate(_mixer->getOutputRate()); +	rate(getRate());  }  MidiDriver_YM2612::~MidiDriver_YM2612() { | 
