const bass = require('./basswrapper').basswrapper;
let basslib = new bass();
let rootPath=process.cwd();
let path=require('path');

let song = 'test.mp3';

basslib.BASS_Init(-1, 44100, basslib.BASS_SAMPLE_DEFAULT);
let chan = basslib.BASS_StreamCreateFile(false, song, 0, 0, basslib.BASS_SAMPLE_DEFAULT);
let Pos20SecondsBytePos=basslib.BASS_ChannelSeconds2Bytes(chan,5);
basslib.BASS_ChannelSetSync(chan,basslib.BASS_SYNC_POS,Pos20SecondsBytePos,(handle,channel,data,user)=>{
 console.log("position reached to 5 secs")
});
basslib.BASS_ChannelPlay(chan, 0);

setInterval(()=> {},1000);