From 4597ebe24b5300f9e0009ae5a4e08a0527214e94 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 10 Jun 2007 02:10:47 +0000 Subject: Plugins that play sound must be sure to set inputs and outputs on audio muxed targets. Add strict adherence to the interface protocols. Make sure playback sets the playback output as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13604 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockboy/rbsound.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/plugins/rockboy/rbsound.c') diff --git a/apps/plugins/rockboy/rbsound.c b/apps/plugins/rockboy/rbsound.c index 4e61d5590c..e671554e25 100644 --- a/apps/plugins/rockboy/rbsound.c +++ b/apps/plugins/rockboy/rbsound.c @@ -45,8 +45,14 @@ void pcm_init(void) } rb->pcm_play_stop(); + +#if INPUT_SRC_CAPS != 0 + /* Select playback */ + rb->audio_set_input_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); + rb->audio_set_output_source(AUDIO_SRC_PLAYBACK); +#endif - rb->pcm_set_frequency(11025); /* 44100 22050 11025 */ + rb->pcm_set_frequency(SAMPR_11); /* 44100 22050 11025 */ } void pcm_close(void) @@ -54,7 +60,7 @@ void pcm_close(void) memset(&pcm, 0, sizeof pcm); newly_started = true; rb->pcm_play_stop(); - rb->pcm_set_frequency(44100); + rb->pcm_set_frequency(HW_SAMPR_DEFAULT); } int pcm_submit(void) -- cgit v1.2.3