public ReferenceHolder(bool Free = true) { if (Free) { _freeproc = Callback; } }
public BassPlayerEngine(bool isMobile, bool crossFade, double deviceBufferSize) { DeviceBufferSize = deviceBufferSize; Init(isMobile); crossFade = CrossfadeEnabled; _sync = EndSync; _posSync = PositonReachedSync; }
//internal clsMTime.clsBBT AudioPlayStartBBT { //Bar pane (blue highlight) // get { // //return Forms.frmTrackMap.BarPaneBBT; // return P.F.CurrentBBT; // } //} internal clsMP3Bass(clsAudioSync autosync, string filepath) { AudioSync = autosync; FilePath = filepath; OpenStream(); delegOnEnd = new SyncProcedure(OnEnd); delegOnPos = new SyncProcedure(OnPos); P.frmSC.panTrkAudio.Enabled = true; Vol = P.frmSC.trkAudioVol.Value; Pan = P.frmSC.trkAudioPan.Value; }
public static (SyncProcedure proc, IntPtr user) CreateProcedure(SyncProcedure proc, IntPtr user = default(IntPtr)) { if (user == default(IntPtr)) { user = new IntPtr(currenSyncProc++); } if (currenSyncProc > 1000) { currenSyncProc = 0; } SyncProcs[user] = proc; return(SyncProcWrapper, user); }
public NetworkDecoder(string Url, Resolution BufferKind = Resolution.Short, Action <BufferProvider> callback = null) : base(BufferKind) { this.Url = Url; if (callback != null) { call = callback; proc = new DownloadProcedure(Callback); } Down_Handler = new SyncProcedure(OnDownloadCompleted); Handle = Bass.CreateStream(Url, 0, BufferKind.ToBassFlag() | BassFlags.Decode | BassFlags.Unicode, (callback != null ? proc : null), IntPtr.Zero); Bass.ChannelSetSync(Handle, SyncFlags.Downloaded, 0, Down_Handler, IntPtr.Zero); }
public Player(string filepath, double volume, bool streaming) { this.FilePath = filepath; Ended = false; if (streaming) { this.reader = new MusicFileReaderStreaming(filepath); } else { this.reader = new MusicFileReader(filepath); } this.IsLoop = !string.IsNullOrEmpty(reader.Tags.GetTag("LOOPSTART")) && (!string.IsNullOrEmpty(reader.Tags.GetTag("LOOPLENGTH")) || !string.IsNullOrEmpty(reader.Tags.GetTag("LOOPEND"))); if (this.IsLoop) { LoopStart = long.Parse(reader.Tags.GetTag("LOOPSTART")); if (!string.IsNullOrEmpty(reader.Tags.GetTag("LOOPLENGTH"))) { LoopEnd = LoopStart + long.Parse(reader.Tags.GetTag("LOOPLENGTH")); } else { LoopEnd = long.Parse(reader.Tags.GetTag("LOOPEND")); } } else { LoopStart = 0; LoopEnd = reader.TotalSamples; } this.tSTREAMPROC = new StreamProcedure(this.StreamProc); this.tSYNCPROC = new SyncProcedure(this.EndProc); this.StreamHandle = Bass.CreateStream(reader.SampleRate, reader.Channels, BassFlags.Float, this.tSTREAMPROC); ChangeVolume(volume); Bass.ChannelSetSync(this.StreamHandle, SyncFlags.Stalled, 0, this.tSYNCPROC); Bass.ChannelPlay(this.StreamHandle); }
public static (SyncProcedure proc, IntPtr user) CreateProcedure(SyncProcedure proc, IntPtr user = default(IntPtr)) { return(proc, user); }
public SyncCallback(SyncProcedure proc) { Sync = proc; }
public int ChannelSetSync(IBassAudioChannel channel, SyncFlags type, long parameter, SyncProcedure procedure, IntPtr user = default) => BassMix.ChannelSetSync(channel.Handle, type, parameter, procedure, user);
public BassPlayerEngine(bool isMobile) { Init(isMobile); _sync = EndSync; _posSync = PositonReachedSync; }
public CoreBreadPlayer() { Init(); _sync = new SyncProcedure(EndSync); _posSync = new SyncProcedure(PositonReachedSync); }
public static extern int ChannelSetSync(int Handle, SyncFlags Type, long Param, SyncProcedure Procedure, IntPtr User = default(IntPtr));
public ReferenceHolder() { _freeproc = Callback; }
/// <summary> /// Default constructor. /// </summary> protected Effect() { _syncProcedure = (a, b, c, d) => Dispose(); }
public CoreBreadPlayer() { Init(); _sync = new SyncProcedure(EndSync); }
public MacalifaPlayer() { Init(); _sync = new SyncProcedure(EndSync); }
public static extern int MixerChannelSetSync(int handle, int type, long param, SyncProcedure proc, IntPtr user);