1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2007-05-04 15:14:56 +00:00
parent 621cf0788f
commit 2aaf45e643
5 changed files with 258 additions and 91 deletions

View file

@ -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 */