require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&GUS_MIXER_INSTALLED)) {
    sub GUS_MIXER_INSTALLED () {	0x1;}
}
unless(defined(&GUS_LOCKED)) {
    sub GUS_LOCKED () {	0x2;}
}
unless(defined(&GUS_CODEC_INSTALLED)) {
    sub GUS_CODEC_INSTALLED () {	0x4;}
}
unless(defined(&GUS_PLAYING)) {
    sub GUS_PLAYING () {	0x8;}
}
unless(defined(&GUS_DMAOUT_ACTIVE)) {
    sub GUS_DMAOUT_ACTIVE () {	0x10;}
}
unless(defined(&GUS_DMAIN_ACTIVE)) {
    sub GUS_DMAIN_ACTIVE () {	0x20;}
}
unless(defined(&GUS_OPEN)) {
    sub GUS_OPEN () {	0x100;}
}
unless(defined(&sc_mixer)) {
    sub sc_mixer () {	 ($u->{sc_mixer_u});}
}
unless(defined(&sc_codec)) {
    sub sc_codec () {	 ($u->{sc_codec_u});}
}
unless(defined(&HAS_CODEC)) {
    sub HAS_CODEC {
	my($sc) = @_;
	eval q((($sc)-> &sc_flags &  &GUS_CODEC_INSTALLED));
    }
}
unless(defined(&HAS_MIXER)) {
    sub HAS_MIXER {
	my($sc) = @_;
	eval q((($sc)-> &sc_flags &  &GUS_MIXER_INSTALLED));
    }
}
unless(defined(&GUSICS_MIC_IN_MUTE)) {
    sub GUSICS_MIC_IN_MUTE () {	0;}
}
unless(defined(&GUSICS_LINE_IN_MUTE)) {
    sub GUSICS_LINE_IN_MUTE () {	1;}
}
unless(defined(&GUSICS_MASTER_MUTE)) {
    sub GUSICS_MASTER_MUTE () {	2;}
}
unless(defined(&GUSICS_CD_MUTE)) {
    sub GUSICS_CD_MUTE () {	3;}
}
unless(defined(&GUSICS_DAC_MUTE)) {
    sub GUSICS_DAC_MUTE () {	4;}
}
unless(defined(&GUSICS_MIC_IN_LVL)) {
    sub GUSICS_MIC_IN_LVL () {	5;}
}
unless(defined(&GUSICS_LINE_IN_LVL)) {
    sub GUSICS_LINE_IN_LVL () {	6;}
}
unless(defined(&GUSICS_CD_LVL)) {
    sub GUSICS_CD_LVL () {	7;}
}
unless(defined(&GUSICS_DAC_LVL)) {
    sub GUSICS_DAC_LVL () {	8;}
}
unless(defined(&GUSICS_MASTER_LVL)) {
    sub GUSICS_MASTER_LVL () {	9;}
}
unless(defined(&GUSICS_RECORD_SOURCE)) {
    sub GUSICS_RECORD_SOURCE () {	10;}
}
unless(defined(&GUSICS_INPUT_CLASS)) {
    sub GUSICS_INPUT_CLASS () {	11;}
}
unless(defined(&GUSICS_OUTPUT_CLASS)) {
    sub GUSICS_OUTPUT_CLASS () {	12;}
}
unless(defined(&GUSICS_RECORD_CLASS)) {
    sub GUSICS_RECORD_CLASS () {	13;}
}
unless(defined(&GUSMAX_MONO_LVL)) {
    sub GUSMAX_MONO_LVL () {	0;}
}
unless(defined(&GUSMAX_DAC_LVL)) {
    sub GUSMAX_DAC_LVL () {	1;}
}
unless(defined(&GUSMAX_LINE_IN_LVL)) {
    sub GUSMAX_LINE_IN_LVL () {	2;}
}
unless(defined(&GUSMAX_CD_LVL)) {
    sub GUSMAX_CD_LVL () {	3;}
}
unless(defined(&GUSMAX_MONITOR_LVL)) {
    sub GUSMAX_MONITOR_LVL () {	4;}
}
unless(defined(&GUSMAX_OUT_LVL)) {
    sub GUSMAX_OUT_LVL () {	5;}
}
unless(defined(&GUSMAX_SPEAKER_LVL)) {
    sub GUSMAX_SPEAKER_LVL () {	6;}
}
unless(defined(&GUSMAX_LINE_IN_MUTE)) {
    sub GUSMAX_LINE_IN_MUTE () {	7;}
}
unless(defined(&GUSMAX_DAC_MUTE)) {
    sub GUSMAX_DAC_MUTE () {	8;}
}
unless(defined(&GUSMAX_CD_MUTE)) {
    sub GUSMAX_CD_MUTE () {	9;}
}
unless(defined(&GUSMAX_MONO_MUTE)) {
    sub GUSMAX_MONO_MUTE () {	10;}
}
unless(defined(&GUSMAX_MONITOR_MUTE)) {
    sub GUSMAX_MONITOR_MUTE () {	11;}
}
unless(defined(&GUSMAX_SPEAKER_MUTE)) {
    sub GUSMAX_SPEAKER_MUTE () {	12;}
}
unless(defined(&GUSMAX_REC_LVL)) {
    sub GUSMAX_REC_LVL () {	13;}
}
unless(defined(&GUSMAX_RECORD_SOURCE)) {
    sub GUSMAX_RECORD_SOURCE () {	14;}
}
unless(defined(&GUSMAX_INPUT_CLASS)) {
    sub GUSMAX_INPUT_CLASS () {	15;}
}
unless(defined(&GUSMAX_RECORD_CLASS)) {
    sub GUSMAX_RECORD_CLASS () {	16;}
}
unless(defined(&GUSMAX_MONITOR_CLASS)) {
    sub GUSMAX_MONITOR_CLASS () {	17;}
}
unless(defined(&GUSMAX_OUTPUT_CLASS)) {
    sub GUSMAX_OUTPUT_CLASS () {	18;}
}
if(defined(&AUDIO_DEBUG)) {
    eval 'sub GUSPLAYDEBUG () {1;}' unless defined(&GUSPLAYDEBUG);
    eval 'sub DPRINTF {
        my($x) = @_;
	    eval q( &if ( &gusdebug)  &printf $x);
    }' unless defined(&DPRINTF);
    eval 'sub DMAPRINTF {
        my($x) = @_;
	    eval q( &if ( &gusdmadebug)  &printf $x);
    }' unless defined(&DMAPRINTF);
} else {
    eval 'sub DPRINTF {
        my($x) = @_;
	    eval q();
    }' unless defined(&DPRINTF);
    eval 'sub DMAPRINTF {
        my($x) = @_;
	    eval q();
    }' unless defined(&DMAPRINTF);
}
unless(defined(&NDMARECS)) {
    sub NDMARECS () {	2048;}
}
if(defined(&GUSPLAYDEBUG)) {
}
if(defined(&GUSPLAYDEBUG)) {
}
unless(defined(&SELECT_GUS_REG)) {
    sub SELECT_GUS_REG {
	my($iot,$ioh1,$x) = @_;
	eval q( &bus_space_write_1($iot,$ioh1, &GUS_REG_SELECT,$x));
    }
}
unless(defined(&ADDR_HIGH)) {
    sub ADDR_HIGH {
	my($x) = @_;
	eval q( (($x >> 7) & 0x1fff));
    }
}
unless(defined(&ADDR_LOW)) {
    sub ADDR_LOW {
	my($x) = @_;
	eval q( (($x & 0x7f) << 9));
    }
}
unless(defined(&GUS_MIN_VOICES)) {
    sub GUS_MIN_VOICES () {	14;}
}
unless(defined(&GUS_MAX_VOICES)) {
    sub GUS_MAX_VOICES () {	32;}
}
unless(defined(&GUS_VOICE_LEFT)) {
    sub GUS_VOICE_LEFT () {	0;}
}
unless(defined(&GUS_VOICE_RIGHT)) {
    sub GUS_VOICE_RIGHT () {	1;}
}
unless(defined(&GUS_MEM_OFFSET)) {
    sub GUS_MEM_OFFSET () {	32;}
}
unless(defined(&GUS_BUFFER_MULTIPLE)) {
    sub GUS_BUFFER_MULTIPLE () {	1024;}
}
unless(defined(&GUS_MEM_FOR_BUFFERS)) {
    sub GUS_MEM_FOR_BUFFERS () {	131072;}
}
unless(defined(&GUS_LEFT_RIGHT_OFFSET)) {
    sub GUS_LEFT_RIGHT_OFFSET () {	( ($sc->{sc_nbufs}) *  ($sc->{sc_chanblocksize}) +  &GUS_MEM_OFFSET);}
}
unless(defined(&GUS_PREC_BYTES)) {
    sub GUS_PREC_BYTES () {	( ($sc->{sc_precision}) >> 3);}
}
unless(defined(&splgus)) {
    sub splgus () {	 &splaudio;}
}
unless(defined(&FLIP_REV)) {
    sub FLIP_REV () {	5;}
}
1;
