summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-10-04 10:30:01 +0000
committerNils Wallménius <nils@rockbox.org>2007-10-04 10:30:01 +0000
commitcb9ba11de6a3755ab537e3f6e6e81bd8bf455457 (patch)
treeced50420d06cde09d7e2f2a3589280903787c78c
parentb0a373681bd57e1790032b9fa7ec5a5d6ea8c37d (diff)
downloadrockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.tar.gz
rockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.zip
Remove wrapper for pressNote and make the function externally visible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14978 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/beatbox/beatbox.c18
-rw-r--r--apps/plugins/midi/sequencer.c11
2 files changed, 8 insertions, 21 deletions
diff --git a/apps/plugins/beatbox/beatbox.c b/apps/plugins/beatbox/beatbox.c
index 00ce42c64b..e24c8e7d0c 100644
--- a/apps/plugins/beatbox/beatbox.c
+++ b/apps/plugins/beatbox/beatbox.c
@@ -16,7 +16,12 @@
16 * 16 *
17 ****************************************************************************/ 17 ****************************************************************************/
18 18
19#include "../../plugin.h" 19#include "plugin.h"
20#include "midi/guspat.h"
21#include "midi/midiutil.h"
22#include "midi/synth.h"
23#include "midi/sequencer.h"
24#include "midi/midifile.h"
20 25
21PLUGIN_HEADER 26PLUGIN_HEADER
22PLUGIN_IRAM_DECLARE 27PLUGIN_IRAM_DECLARE
@@ -114,15 +119,6 @@ struct MIDIfile * mf IBSS_ATTR;
114int numberOfSamples IBSS_ATTR; 119int numberOfSamples IBSS_ATTR;
115long bpm IBSS_ATTR; 120long bpm IBSS_ATTR;
116 121
117
118#include "plugin.h"
119#include "midi/guspat.h"
120#include "midi/midiutil.h"
121#include "midi/synth.h"
122#include "midi/sequencer.h"
123#include "midi/midifile.h"
124
125
126const unsigned char * drumNames[]={ 122const unsigned char * drumNames[]={
127 "Bass Drum 2 ", 123 "Bass Drum 2 ",
128 "Bass Drum 1 ", 124 "Bass Drum 1 ",
@@ -362,7 +358,7 @@ void sendEvents()
362 for(i=0; i<V_NUMCELLS; i++) 358 for(i=0; i<V_NUMCELLS; i++)
363 { 359 {
364 if(trackData[trackPos[i]][i] == VAL_ENABLED) 360 if(trackData[trackPos[i]][i] == VAL_ENABLED)
365 pressNote_Nonstatic(9, trackMap[i], 127); 361 pressNote(9, trackMap[i], 127);
366 } 362 }
367} 363}
368 364
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c
index a44bacfce8..82da3efbcf 100644
--- a/apps/plugins/midi/sequencer.c
+++ b/apps/plugins/midi/sequencer.c
@@ -157,7 +157,7 @@ static inline void setPW(int ch, int msb, int lsb)
157 } 157 }
158} 158}
159 159
160static void pressNote(int ch, int note, int vol) 160inline void pressNote(int ch, int note, int vol)
161{ 161{
162 static int lastKill = 0; 162 static int lastKill = 0;
163/* Silences all channels but one, for easy debugging, for me. */ 163/* Silences all channels but one, for easy debugging, for me. */
@@ -379,12 +379,3 @@ int tick(void)
379 return 0; 379 return 0;
380} 380}
381 381
382
383/* Ugly hack so that beatbox can get at teh pressnote function */
384/* Is there a speed advantage to keeping pressNote itself static? */
385/* Note that midiplay needs the speed much more than beatbox does */
386void pressNote_Nonstatic(int ch, int note, int vol)
387{
388 pressNote(ch, note, vol);
389}
390