let bass = require('../playerCan/basswrapper').basswrapper;
let basslib = new bass();
let initresult=basslib.BASS_Init(-1,44100,basslib.BASS_DEVICE_SPEAKERS)
let mixer=basslib.BASS_Mixer_StreamCreate(44100,2,0 | basslib.BASS_MIXER_NONSTOP )
let ee=basslib.BASS_ChannelPlay(mixer,0);


var enc_chan=basslib.BASS_Encode_Start(mixer,'lame -r -m s -s 22050 -b 56 -',basslib.BASS_ENCODE_NOHEAD);
var result=basslib.BASS_Encode_CastInit(enc_chan,
    'http://carrefour.smg.com.tr:8000/serkantest',
    '1q2w3e',
    basslib.BASS_ENCODE_TYPE_MP3,
    'test stream',
    'http://your-server-ip',
    'pop',
    'this is my new icecast test',
    'header1\r\nheader2\r\n',
    44100,
    true //public
);

var result=basslib.BASS_Encode_SetNotify(enc_chan,function(handle,status,user) {
    console.log(status)

});
console.log(initresult)

setInterval(()=>{

},500)