diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-05-04 15:14:56 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-05-04 15:14:56 +0000 |
commit | 2aaf45e643053b9a3515e4320b82b16fb32be02a (patch) | |
tree | 3f29921a8e0ef2a752e2104ef96d9862c53017e2 /apps/plugins/test_sampr.c | |
parent | 621cf0788fd69c967688692b7f19c02b6df7a322 (diff) | |
download | rockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.tar.gz rockbox-2aaf45e643053b9a3515e4320b82b16fb32be02a.zip |
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/test_sampr.c')
-rw-r--r-- | apps/plugins/test_sampr.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
198 | rb->audio_stop(); | 198 | rb->audio_stop(); |
199 | rb->sound_set(SOUND_VOLUME, rb->sound_default(SOUND_VOLUME)); | 199 | rb->sound_set(SOUND_VOLUME, rb->sound_default(SOUND_VOLUME)); |
200 | 200 | ||
201 | #ifdef HAVE_RECORDING | ||
201 | /* Select playback */ | 202 | /* Select playback */ |
202 | rb->rec_set_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); | 203 | rb->rec_set_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); |
204 | #endif | ||
203 | 205 | ||
206 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
204 | rb->cpu_boost(true); | 207 | rb->cpu_boost(true); |
208 | #endif | ||
205 | 209 | ||
206 | rb->pcm_set_frequency(rb->hw_freq_sampr[freq]); | 210 | rb->pcm_set_frequency(rb->hw_freq_sampr[freq]); |
207 | 211 | ||
@@ -223,7 +227,9 @@ void play_waveform(void) | |||
223 | while (rb->pcm_is_playing()) | 227 | while (rb->pcm_is_playing()) |
224 | rb->yield(); | 228 | rb->yield(); |
225 | 229 | ||
230 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
226 | rb->cpu_boost(false); | 231 | rb->cpu_boost(false); |
232 | #endif | ||
227 | 233 | ||
228 | /* restore default - user of apis is responsible for restoring | 234 | /* restore default - user of apis is responsible for restoring |
229 | default state - normally playback at 44100Hz */ | 235 | default state - normally playback at 44100Hz */ |