var dirname=process.cwd();
var path=require('path')
basswrapper=require(path.join(dirname,'basswrapper.node'))
basswrapper.InitLibrary(dirname + path.sep)

var result = basswrapper.BASS_Init(-1, 44100, basswrapper.BASS_DEVICE_SPEAKERS)
var mixer=basswrapper.BASS_Mixer_StreamCreate(44100, 2,basswrapper.BASS_SAMPLE_FLOAT);
var chan1=basswrapper.BASS_StreamCreateFile(0,path.join(dirname,'test1.mp3'),0,0,basswrapper.BASS_STREAM_DECODE )
//var chan2=basswrapper.BASS_StreamCreateFile(0,'test2.mp3',0,0,basswrapper.BASS_STREAM_DECODE | basswrapper.BASS_SAMPLE_FLOAT)
var ok1 = basswrapper.BASS_Mixer_StreamAddChannel(mixer, chan1, basswrapper.BASS_STREAM_DECODE);
//var ok2 = basswrapper.BASS_Mixer_StreamAddChannel(mixer, chan2, basswrapper.BASS_SAMPLE_DEFAULT);

basswrapper.BASS_ChannelSetAttribute(chan1, basswrapper.BASS_ATTRIB_VOL, 0);
//check

basswrapper.BASS_ChannelSlideAttribute(chan1, basswrapper.BASS_ATTRIB_VOL, 1, 4000)
basswrapper.BASS_ChannelPlay(mixer,0)
console.log('mixer:',mixer)



setInterval(()=>{

},1000)