diff src/console/Classic_Emu.cxx @ 341:986f098da058 trunk

[svn] - merge in blargg's changes
author nenolod
date Thu, 07 Dec 2006 15:20:41 -0800
parents fb513e10174e
children
line wrap: on
line diff
--- a/src/console/Classic_Emu.cxx	Wed Dec 06 07:57:05 2006 -0800
+++ b/src/console/Classic_Emu.cxx	Thu Dec 07 15:20:41 2006 -0800
@@ -1,4 +1,4 @@
-// Game_Music_Emu 0.5.1. http://www.slack.net/~ant/
+// Game_Music_Emu 0.5.2. http://www.slack.net/~ant/
 
 #include "Classic_Emu.h"
 
@@ -43,7 +43,7 @@
 		buf->bass_freq( equalizer().bass );
 }
 	
-blargg_err_t Classic_Emu::set_sample_rate_( long sample_rate )
+blargg_err_t Classic_Emu::set_sample_rate_( long rate )
 {
 	if ( !buf )
 	{
@@ -51,7 +51,7 @@
 			CHECK_ALLOC( stereo_buffer = BLARGG_NEW Stereo_Buffer );
 		buf = stereo_buffer;
 	}
-	return buf->set_sample_rate( sample_rate, 1000 / 20 );
+	return buf->set_sample_rate( rate, 1000 / 20 );
 }
 
 void Classic_Emu::mute_voices_( int mask )
@@ -73,10 +73,15 @@
 	}
 }
 
-blargg_err_t Classic_Emu::setup_buffer( long rate )
+void Classic_Emu::change_clock_rate( long rate )
 {
 	clock_rate_ = rate;
 	buf->clock_rate( rate );
+}
+
+blargg_err_t Classic_Emu::setup_buffer( long rate )
+{
+	change_clock_rate( rate );
 	RETURN_ERR( buf->set_channel_count( voice_count() ) );
 	set_equalizer( equalizer() );
 	buf_changed_count = buf->channels_changed_count();