From 2aaf45e643053b9a3515e4320b82b16fb32be02a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 4 May 2007 15:14:56 +0000 Subject: Get samplerate switching working in the sim to be similar to on target. Make all pcm functions available there as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13320 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/test_sampr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/plugins') diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c index 7e78137e97..891e68ffda 100644 --- a/apps/plugins/test_sampr.c +++ b/apps/plugins/test_sampr.c @@ -198,10 +198,14 @@ void play_waveform(void) rb->audio_stop(); rb->sound_set(SOUND_VOLUME, rb->sound_default(SOUND_VOLUME)); +#ifdef HAVE_RECORDING /* Select playback */ rb->rec_set_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); +#endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); +#endif rb->pcm_set_frequency(rb->hw_freq_sampr[freq]); @@ -223,7 +227,9 @@ void play_waveform(void) while (rb->pcm_is_playing()) rb->yield(); +#ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(false); +#endif /* restore default - user of apis is responsible for restoring default state - normally playback at 44100Hz */ -- cgit v1.2.3