summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-05-04 15:14:56 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-05-04 15:14:56 +0000
commit2aaf45e643053b9a3515e4320b82b16fb32be02a (patch)
tree3f29921a8e0ef2a752e2104ef96d9862c53017e2 /apps/plugins
parent621cf0788fd69c967688692b7f19c02b6df7a322 (diff)
downloadrockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.zip
rockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.tar.gz
rockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.tar.bz2
rockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.tar.xz
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
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/test_sampr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c
index 7e78137..891e68f 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 */