From b2f1b5dd183b1171c81796946c868f2df8df9647 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Mon, 1 May 2006 23:22:59 +0000 Subject: ---------------------------------------------------------------------- Added Karl Kurbjun's sound output patch, cleaned up some output. Main file is now midiplay.c, midi2wav is still in there for anyone who wants it. Set sampling rate to 22k, and increased note decay time. Reduced number of concurrent active voices and made new notes replace used voices if none are available. This makes lag less apparent. I really hope this wont go red. (turns around and runs) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9858 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/guspat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/plugins/midi/guspat.c') diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 6f1866cd58..4b5e7a6a28 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -31,11 +31,11 @@ unsigned int readDWord(int file) struct GWaveform * loadWaveform(int file) { - struct GWaveform * wav = (struct GWaveform *)allocate(sizeof(struct GWaveform)); + struct GWaveform * wav = (struct GWaveform *)malloc(sizeof(struct GWaveform)); rb->memset(wav, 0, sizeof(struct GWaveform)); wav->name=readData(file, 7); - printf("\nWAVE NAME = [%s]", wav->name); +/* printf("\nWAVE NAME = [%s]", wav->name); */ wav->fractions=readChar(file); wav->wavSize=readDWord(file); wav->startLoop=readDWord(file); @@ -62,7 +62,7 @@ struct GWaveform * loadWaveform(int file) wav->scaleFreq=readWord(file); wav->scaleFactor=readWord(file); - printf("\nScaleFreq = %d ScaleFactor = %d RootFreq = %d", wav->scaleFreq, wav->scaleFactor, wav->rootFreq); +/* printf("\nScaleFreq = %d ScaleFactor = %d RootFreq = %d", wav->scaleFreq, wav->scaleFactor, wav->rootFreq); */ wav->res=readData(file, 36); wav->data=readData(file, wav->wavSize); @@ -137,7 +137,7 @@ int selectWaveform(struct GPatch * pat, int midiNote) struct GPatch * gusload(char * filename) { - struct GPatch * gp = (struct GPatch *)allocate(sizeof(struct GPatch)); + struct GPatch * gp = (struct GPatch *)malloc(sizeof(struct GPatch)); rb->memset(gp, 0, sizeof(struct GPatch)); int file = rb->open(filename, O_RDONLY); @@ -175,15 +175,15 @@ struct GPatch * gusload(char * filename) gp->layerRes=readData(file,40); - printf("\nFILE: %s", filename); - printf("\nlayerSamples=%d", gp->numWaves); +/* printf("\nFILE: %s", filename); */ +/* printf("\nlayerSamples=%d", gp->numWaves); */ int a=0; for(a=0; anumWaves; a++) gp->waveforms[a] = loadWaveform(file); - printf("\nPrecomputing note table"); +/* printf("\nPrecomputing note table"); */ for(a=0; a<128; a++) { -- cgit v1.2.3