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/midiplay.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/midiplay.c')
-rw-r--r-- | apps/plugins/midiplay.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/midiplay.c b/apps/plugins/midiplay.c index e586f7b0fe..9dda07482e 100644 --- a/apps/plugins/midiplay.c +++ b/apps/plugins/midiplay.c | |||
@@ -80,11 +80,11 @@ PLUGIN_IRAM_DECLARE | |||
80 | #define FRACTSIZE 10 | 80 | #define FRACTSIZE 10 |
81 | 81 | ||
82 | #ifndef SIMULATOR | 82 | #ifndef SIMULATOR |
83 | #define SAMPLE_RATE 22050 // 44100 22050 11025 | 83 | #define SAMPLE_RATE SAMPR_22 // 44100 22050 11025 |
84 | #define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi | 84 | #define MAX_VOICES 20 // Note: 24 midi channels is the minimum general midi |
85 | // spec implementation | 85 | // spec implementation |
86 | #else // Simulator requires 44100, and we can afford to use more voices | 86 | #else // Simulator requires 44100, and we can afford to use more voices |
87 | #define SAMPLE_RATE 44100 | 87 | #define SAMPLE_RATE SAMPR_44 |
88 | #define MAX_VOICES 48 | 88 | #define MAX_VOICES 48 |
89 | #endif | 89 | #endif |
90 | 90 | ||
@@ -232,6 +232,11 @@ int midimain(void * filename) | |||
232 | 232 | ||
233 | //#ifndef SIMULATOR | 233 | //#ifndef SIMULATOR |
234 | rb->pcm_play_stop(); | 234 | rb->pcm_play_stop(); |
235 | #if INPUT_SRC_CAPS != 0 | ||
236 | /* Select playback */ | ||
237 | rb->audio_set_input_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK); | ||
238 | rb->audio_set_output_source(AUDIO_SRC_PLAYBACK); | ||
239 | #endif | ||
235 | rb->pcm_set_frequency(SAMPLE_RATE); // 44100 22050 11025 | 240 | rb->pcm_set_frequency(SAMPLE_RATE); // 44100 22050 11025 |
236 | //#endif | 241 | //#endif |
237 | 242 | ||