require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_DEV_MIDISYNVAR_H_)) {
    eval 'sub _SYS_DEV_MIDISYNVAR_H_ () {1;}' unless defined(&_SYS_DEV_MIDISYNVAR_H_);
    eval 'sub MS_CHANNOTE {
        my($chan, $note) = @_;
	    eval q((($chan) * 256+ ($note)));
    }' unless defined(&MS_CHANNOTE);
    eval 'sub MS_GETCHAN {
        my($v) = @_;
	    eval q((($v)-> &chan_note >> 8));
    }' unless defined(&MS_GETCHAN);
    eval 'sub MIDI_MAX_CHANS () {16;}' unless defined(&MIDI_MAX_CHANS);
    eval 'sub MS_DOALLOC () {1;}' unless defined(&MS_DOALLOC);
    eval 'sub MS_FREQXLATE () {2;}' unless defined(&MS_FREQXLATE);
    eval 'sub MS_GETPGM {
        my($ms, $vno) = @_;
	    eval q((($ms)-> $pgms[ &MS_GETCHAN(($ms)-> $voices[$vno])]));
    }' unless defined(&MS_GETPGM);
    eval 'sub MIDISYN_FREQ_TO_HZ {
        my($f) = @_;
	    eval q((($f) >> 16));
    }' unless defined(&MIDISYN_FREQ_TO_HZ);
}
1;
