public int defineSync(int stream, AudioTimeMarker markers, AudioFileTrack.TimeSyncFct fct)
        {

            if (stream != 0)
            {
                long nextpos = Bass.BASS_ChannelSeconds2Bytes(stream, markers.getNext().TotalSeconds); // set to whatever you need
                Console.WriteLine("DEFINITION SYNC MARKER:" + nextpos + " (" + markers.getNext().TotalSeconds + "sec)");
                synctable.Add(stream, new SYNCPROC(fct));
                int id = Bass.BASS_ChannelSetSync(stream, BASSSync.BASS_SYNC_POS | BASSSync.BASS_SYNC_MIXTIME,
                nextpos, (SYNCPROC)synctable[stream], new IntPtr());
                this.idsynctable.Add(stream, id);
                return id;

            }
            else
                return 0;


        }
Exemplo n.º 2
0
 public AUDIOTRACK newFileTrack(String filename, AudioTimeMarker markers)
 {
     AudioFileTrack track = new AudioFileTrack(this, filename, markers);
     tracks.AddLast(track);
     return track;
 }
        public int defineEndSync(int stream, AudioFileTrack.TimeSyncFct fct)
        {

            if (stream != 0)
            {
                Console.WriteLine("DEFINITION END SYNC MARKER");
                syncendtable.Add(stream, new SYNCPROC(fct));
                int id = Bass.BASS_ChannelSetSync(stream, BASSSync.BASS_SYNC_MIXTIME | BASSSync.BASS_SYNC_FREE,
                0, (SYNCPROC)syncendtable[stream], new IntPtr());
                this.idsyncendtable.Add(stream, id);
                return id;
            }
            else
                return 0;


        }