From: slack Date: Fri, 12 Jun 2009 14:39:50 +0000 (+0200) Subject: Added code to count used instrument data bytes X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=d1a76f05f119f1a21d1d2d6060a34c0367c0244d;p=lolailo.git Added code to count used instrument data bytes --- diff --git a/lolailo.c b/lolailo.c index 806e13f..08de771 100644 --- a/lolailo.c +++ b/lolailo.c @@ -4,6 +4,7 @@ //#include "mainwindow.h" #include "synth.h" #include "play.h" +#include "sizedtypes.h" #include "thesong.h" @@ -26,6 +27,18 @@ void _start() SDL_OpenAudio(&desired, NULL); SDL_PauseAudio(0); + int instrument_data_length=0; + int playlist_length=0; + + for (uint8 *p = thesong.playlist; *p != 255; p++) + playlist_length++; + + for (uint8 *p = thesong.instrument_data; *p != 255; p++) + instrument_data_length++; + + printf("playlist: %4d bytes\n", playlist_length+1); + printf("instrument_data: %4d bytes\n", instrument_data_length+1); + //QApplication a(argc, argv); //MainWindow w(NULL); //w.show();