diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-06-10 02:10:47 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-06-10 02:10:47 +0000 |
commit | 4597ebe24b5300f9e0009ae5a4e08a0527214e94 (patch) | |
tree | a1d5c3e6c305b5033efca4827e9e2d116662bda3 /apps/plugins/doom/i_sound.c | |
parent | 19cc9d063a22cd5162e164d8f5e2fe98944c3721 (diff) | |
download | rockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.tar.gz rockbox-4597ebe24b5300f9e0009ae5a4e08a0527214e94.zip |
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/i_sound.c')
-rw-r--r-- | apps/plugins/doom/i_sound.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c index d79f7a132b..2f4f594077 100644 --- a/apps/plugins/doom/i_sound.c +++ b/apps/plugins/doom/i_sound.c | |||
@@ -56,9 +56,9 @@ | |||
56 | #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL) | 56 | #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL) |
57 | 57 | ||
58 | #ifdef HW_HAVE_11 | 58 | #ifdef HW_HAVE_11 |
59 | #define SAMPLERATE 11025 // 44100 22050 11025 | 59 | #define SAMPLERATE SAMPR_11 // 44100 22050 11025 |
60 | #else | 60 | #else |
61 | #define SAMPLERATE 44100 // 44100 22050 11025 | 61 | #define SAMPLERATE SAMPR_44 // 44100 22050 11025 |
62 | #endif | 62 | #endif |
63 | #define SAMPLESIZE 2 // 16bit | 63 | #define SAMPLESIZE 2 // 16bit |
64 | 64 | ||
@@ -481,7 +481,7 @@ void I_SubmitSound(void) | |||
481 | void I_ShutdownSound(void) | 481 | void I_ShutdownSound(void) |
482 | { | 482 | { |
483 | rb->pcm_play_stop(); | 483 | rb->pcm_play_stop(); |
484 | rb->pcm_set_frequency(44100); // 44100 | 484 | rb->pcm_set_frequency(HW_SAMPR_DEFAULT); // 44100 |
485 | } | 485 | } |
486 | 486 | ||
487 | void I_InitSound() | 487 | void I_InitSound() |
@@ -491,6 +491,12 @@ void I_InitSound() | |||
491 | // Initialize external data (all sounds) at start, keep static. | 491 | // Initialize external data (all sounds) at start, keep static. |
492 | printf( "I_InitSound: "); | 492 | printf( "I_InitSound: "); |
493 | rb->pcm_play_stop(); | 493 | rb->pcm_play_stop(); |
494 | |||
495 | #if INPUT_SRC_CAPS != 0 | ||
496 | /* Select playback */ | ||
497 | rb->audio_set_input_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); | ||
498 | rb->audio_set_output_source(AUDIO_SRC_PLAYBACK); | ||
499 | #endif | ||
494 | rb->pcm_set_frequency(SAMPLERATE); | 500 | rb->pcm_set_frequency(SAMPLERATE); |
495 | 501 | ||
496 | vol_lookup=malloc(128*256*sizeof(int)); | 502 | vol_lookup=malloc(128*256*sizeof(int)); |