From fcf4a7241a742e7f3d8189c40ad852d48c674612 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 20 Sep 2009 21:21:30 +0000 Subject: Remove old test code. Subversion-branch: /branches/opl-branch Subversion-revision: 1684 --- src/i_oplmusic.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/i_oplmusic.c') diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index aa079614..b8e93534 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -43,8 +43,6 @@ #include "opl.h" #include "midifile.h" -//#define TEST - #define MAXMIDLENGTH (96 * 1024) #define GENMIDI_NUM_INSTRS 128 @@ -716,9 +714,6 @@ static void I_OPL_ShutdownMusic(void) { if (music_initialised) { -#ifdef TEST - InitRegisters(); -#endif OPL_Shutdown(); // Release GENMIDI lump @@ -729,30 +724,6 @@ static void I_OPL_ShutdownMusic(void) } } -#ifdef TEST -static void TestCallback(void *arg) -{ - opl_voice_t *voice = arg; - int note; - int wait_time; - - // Set level: - WriteRegister(OPL_REGS_LEVEL + voice->op2, 0); - - // Note off: - - WriteRegister(OPL_REGS_FREQ_2 + voice->index, 0x00); - // Note on: - - note = (rand() % (0x2ae - 0x16b)) + 0x16b; - WriteRegister(OPL_REGS_FREQ_1 + voice->index, note & 0xff); - WriteRegister(OPL_REGS_FREQ_2 + voice->index, 0x30 + (note >> 8)); - - wait_time = (rand() % 700) + 50; - OPL_SetCallback(wait_time, TestCallback, arg); -} -#endif - // Initialise music subsystem static boolean I_OPL_InitMusic(void) @@ -789,24 +760,6 @@ static boolean I_OPL_InitMusic(void) init_stage_reg_writes = false; -#ifdef TEST - { - int i; - opl_voice_t *voice; - int instr_num; - - for (i=0; i<3; ++i) - { - voice = GetFreeVoice(); - instr_num = rand() % 100; - - SetVoiceInstrument(voice, &main_instrs[instr_num], 0); - - OPL_SetCallback(0, TestCallback, voice); - } - } -#endif - music_initialised = true; return true; -- cgit v1.2.3