const defaultSoundCard=-1
const defaultFlags=0
const outputChannelCount=2

const rootPath=process.cwd()
const path=require('path')
const clsPlayer = require('./clsPlayer').clsPlayer;
let masterMixer = new clsPlayer();

var initResult=masterMixer.initSoundCard(defaultSoundCard,defaultFlags)
var att=masterMixer.bassAttributes;
var mixerChan=masterMixer.createMixer(outputChannelCount,masterMixer.bassAttributes.BASS_SAMPLE_FLOAT)


let song = path.join(rootPath,'files','2ff7b6c4-96ca-4644-bdec-c53c2fde4902.mp3');
var player=new clsPlayer();
var initResult=player.initSoundCard(defaultSoundCard, player.bassAttributes.BASS_STREAM_DECODE)

var chan=player.openFile(song, player.bassAttributes.BASS_STREAM_DECODE );

var res=masterMixer.addChannelToMixer(chan, player.bassAttributes.BASS_STREAM_DECODE)
var err=masterMixer.getError()
masterMixer.PlayMixer()


console.log(initResult)