diff options
| author | Nils Wallménius <nils@rockbox.org> | 2007-10-04 10:30:01 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2007-10-04 10:30:01 +0000 |
| commit | cb9ba11de6a3755ab537e3f6e6e81bd8bf455457 (patch) | |
| tree | ced50420d06cde09d7e2f2a3589280903787c78c /apps/plugins | |
| parent | b0a373681bd57e1790032b9fa7ec5a5d6ea8c37d (diff) | |
| download | rockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.zip rockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.tar.gz rockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.tar.bz2 rockbox-cb9ba11de6a3755ab537e3f6e6e81bd8bf455457.tar.xz | |
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
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/beatbox/beatbox.c | 18 | ||||
| -rw-r--r-- | apps/plugins/midi/sequencer.c | 11 |
2 files changed, 8 insertions, 21 deletions
diff --git a/apps/plugins/beatbox/beatbox.c b/apps/plugins/beatbox/beatbox.c index 00ce42c..e24c8e7 100644 --- a/apps/plugins/beatbox/beatbox.c +++ b/apps/plugins/beatbox/beatbox.c @@ -16,7 +16,12 @@ * ****************************************************************************/ -#include "../../plugin.h" +#include "plugin.h" +#include "midi/guspat.h" +#include "midi/midiutil.h" +#include "midi/synth.h" +#include "midi/sequencer.h" +#include "midi/midifile.h" PLUGIN_HEADER PLUGIN_IRAM_DECLARE @@ -114,15 +119,6 @@ struct MIDIfile * mf IBSS_ATTR; int numberOfSamples IBSS_ATTR; long bpm IBSS_ATTR; - -#include "plugin.h" -#include "midi/guspat.h" -#include "midi/midiutil.h" -#include "midi/synth.h" -#include "midi/sequencer.h" -#include "midi/midifile.h" - - const unsigned char * drumNames[]={ "Bass Drum 2 ", "Bass Drum 1 ", @@ -362,7 +358,7 @@ void sendEvents() for(i=0; i<V_NUMCELLS; i++) { if(trackData[trackPos[i]][i] == VAL_ENABLED) - pressNote_Nonstatic(9, trackMap[i], 127); + pressNote(9, trackMap[i], 127); } } diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index a44bacf..82da3ef 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) } } -static void pressNote(int ch, int note, int vol) +inline void pressNote(int ch, int note, int vol) { static int lastKill = 0; /* Silences all channels but one, for easy debugging, for me. */ @@ -379,12 +379,3 @@ int tick(void) return 0; } - -/* Ugly hack so that beatbox can get at teh pressnote function */ -/* Is there a speed advantage to keeping pressNote itself static? */ -/* Note that midiplay needs the speed much more than beatbox does */ -void pressNote_Nonstatic(int ch, int note, int vol) -{ - pressNote(ch, note, vol); -} - |