Example #1
0
        public AudioStreamFile(Track Track,
                               float GainDB,
                               float[] Equalizer,
                               int NumEqBands,
                               bool EqualizerOn,
                               ReplayGainMode ReplayGain)
            : base(Track, GainDB, Equalizer, NumEqBands, EqualizerOn, ReplayGain)
        {
            this.filePath = track.FilePath;


            if (filePath != String.Empty)
            {
                Bass.BASS_Init(0, 0, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
                streamRef = Bass.BASS_StreamCreateFile(filePath, 0, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);
            }

            setupChannelFromStream();

            TrackWriter.UpdateTrackInfo(track, info);
        }