summaryrefslogtreecommitdiff
path: root/apps/plugins/doom
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-06-10 02:10:47 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-06-10 02:10:47 +0000
commit4597ebe24b5300f9e0009ae5a4e08a0527214e94 (patch)
treea1d5c3e6c305b5033efca4827e9e2d116662bda3 /apps/plugins/doom
parent19cc9d063a22cd5162e164d8f5e2fe98944c3721 (diff)
downloadrockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.zip
rockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.tar.gz
rockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.tar.bz2
rockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.tar.xz
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
Diffstat (limited to 'apps/plugins/doom')
-rw-r--r--apps/plugins/doom/i_sound.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c
index d79f7a1..2f4f594 100644
--- a/apps/plugins/doom/i_sound.c
+++ b/apps/plugins/doom/i_sound.c
@@ -56,9 +56,9 @@
#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
#ifdef HW_HAVE_11
-#define SAMPLERATE 11025 // 44100 22050 11025
+#define SAMPLERATE SAMPR_11 // 44100 22050 11025
#else
-#define SAMPLERATE 44100 // 44100 22050 11025
+#define SAMPLERATE SAMPR_44 // 44100 22050 11025
#endif
#define SAMPLESIZE 2 // 16bit
@@ -481,7 +481,7 @@ void I_SubmitSound(void)
void I_ShutdownSound(void)
{
rb->pcm_play_stop();
- rb->pcm_set_frequency(44100); // 44100
+ rb->pcm_set_frequency(HW_SAMPR_DEFAULT); // 44100
}
void I_InitSound()
@@ -491,6 +491,12 @@ void I_InitSound()
// Initialize external data (all sounds) at start, keep static.
printf( "I_InitSound: ");
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(SAMPLERATE);
vol_lookup=malloc(128*256*sizeof(int));