From 4b773c0c4c1f6c8c003038161fa44292b501e55a Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Sat, 16 Apr 2005 03:35:20 +0000 Subject: Added xxx2wav support, an icon, and some optimizations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6306 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/guspat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/plugins/midi/guspat.c') diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 6508591f74..f674b64caa 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -66,6 +66,18 @@ struct GWaveform * loadWaveform(int file) wav->res=readData(file, 36); wav->data=readData(file, wav->wavSize); + int a=0; + + //If we have a 16 bit waveform + if(wav->mode & 1 && (wav->mode & 2)) + { + for(a=0; awavSize; a+=2) //Convert it to + { + //wav->data[a]=wav->data[a]; //+((wav->mode & 2) << 6); + wav->data[a|1]=wav->data[(a)|1]+(1 << 7); + } + } + return wav; } -- cgit v1.2.3