midi plugin: make local functions static where possible

Change-Id: I702755529f98015586b5b9592ced75cf7591880c
This commit is contained in:
Bertrik Sikken 2012-02-18 12:06:48 +01:00
parent 43a940c8cb
commit 8a87b663ed
7 changed files with 10 additions and 9 deletions

View file

@ -37,12 +37,12 @@ const uint32_t gustable[]=
4186073, 4434930, 4698645, 4978041, 5274051, 5587663, 5919922, 6271939, 6644889, 7040015, 7458636, 7902150
};
unsigned int readWord(int file)
static unsigned int readWord(int file)
{
return (readChar(file)<<0) | (readChar(file)<<8); // | (readChar(file)<<8) | (readChar(file)<<0);
}
unsigned int readDWord(int file)
static unsigned int readDWord(int file)
{
return (readChar(file)<<0) | (readChar(file)<<8) | (readChar(file)<<16) | (readChar(file)<<24);
}
@ -50,7 +50,7 @@ unsigned int readDWord(int file)
int curr_waveform;
struct GWaveform waveforms[256] IBSS_ATTR;
struct GWaveform * loadWaveform(int file)
static struct GWaveform * loadWaveform(int file)
{
struct GWaveform * wav = &waveforms[curr_waveform++];
rb->memset(wav, 0, sizeof(struct GWaveform));
@ -137,7 +137,7 @@ struct GWaveform * loadWaveform(int file)
return wav;
}
int selectWaveform(struct GPatch * pat, int midiNote)
static int selectWaveform(struct GPatch * pat, int midiNote)
{
/* We divide by 100 here because everyone's freq formula is slightly different */
unsigned int tabFreq = gustable[midiNote]/100; /* Comparison */

View file

@ -20,6 +20,7 @@
****************************************************************************/
#include "plugin.h"
#include "midiutil.h"
#include "midifile.h"
struct Track * readTrack(int file);
int readID(int file);
@ -125,7 +126,7 @@ struct MIDIfile * loadFile(const char * filename)
int rStatus = 0;
/* Returns 0 if done, 1 if keep going */
int readEvent(int file, void * dest)
static int readEvent(int file, void * dest)
{
struct Event dummy;
struct Event * ev = (struct Event *) dest;

View file

@ -319,7 +319,7 @@ static inline void synthbuf(void)
samples_in_buf = BUF_SIZE-i;
}
void get_more(unsigned char** start, size_t* size)
static void get_more(unsigned char** start, size_t* size)
{
#ifndef SYNC
if(lastswap != swap)

View file

@ -37,7 +37,7 @@ struct GPatch * drumSet[128];
struct SynthObject voices[MAX_VOICES] IBSS_ATTR;
void *alloc(int size)
static void *alloc(int size)
{
static char *offset = NULL;
static size_t totalSize = 0;

View file

@ -22,6 +22,7 @@
#include "midiutil.h"
#include "guspat.h"
#include "synth.h"
#include "sequencer.h"
long tempo = 375000;

View file

@ -22,7 +22,6 @@
int tick(void);
/* used by beatbox */
void pressNote(int ch, int note, int vol);
void rewindFile(void);
void seekForward(int nSec);

View file

@ -23,7 +23,7 @@
#include "midiutil.h"
#include "synth.h"
void readTextBlock(int file, char * buf)
static void readTextBlock(int file, char * buf)
{
char c = 0;
do