コード例 #1
0
        private void createMixer()
        {
            if (Handle != 0)
            {
                return;
            }

            // Make sure that bass is initialised before trying to create a mixer.
            // If not, this will be called again when the device is initialised via UpdateDevice().
            if (!ManagedBass.Bass.GetDeviceInfo(ManagedBass.Bass.CurrentDevice, out var deviceInfo) || !deviceInfo.IsInitialized)
            {
                return;
            }

            Handle = BassMix.CreateMixerStream(frequency, 2, BassFlags.MixerNonStop);
            if (Handle == 0)
            {
                return;
            }

            // Lower latency is valued more for the time since we are not using complex DSP effects. Disable buffering on the mixer channel in order for data to be produced immediately.
            ManagedBass.Bass.ChannelSetAttribute(Handle, ChannelAttribute.Buffer, 0);

            // Register all channels that were previously played prior to the mixer being loaded.
            var toAdd = activeChannels.ToArray();

            activeChannels.Clear();
            foreach (var channel in toAdd)
            {
                AddChannelToBassMix(channel);
            }

            Effects.BindCollectionChanged(onEffectsChanged, true);

            ManagedBass.Bass.ChannelPlay(Handle);
            HandleCreated?.Invoke(Handle);
        }
コード例 #2
0
        private void FileSystemWatcher_Created(object sender, FileSystemEventArgs args)
        {
            var actions = GetActions();

            actions["Unified"].Enqueue(() => HandleCreated?.Invoke(args) == true);
        }
コード例 #3
0
ファイル: WindowEx.cs プロジェクト: IVSoftware/wpf-window-ex
 protected virtual void OnHandleCreated(EventArgs e)
 {
     HandleCreated?.Invoke(this, e);
 }
コード例 #4
0
 protected virtual void OnHandleCreated()
 {
     HandleCreated?.Invoke(this, null);
 }
コード例 #5
0
 private void InnerForm_Load(object sender, EventArgs e)
 {
     Handle = innerForm.Handle;
     windowHandleCreateEvent.Set();
     HandleCreated?.Invoke(this, e);
 }
コード例 #6
0
 void OnHandleCreated(object sender, EventArgs e)
 {
     HandleCreated?.Invoke((D3DSurface)sender);
 }
コード例 #7
0
 protected virtual void OnHandleCreated(EventArgs e)
 {
     HandleCreated?.Invoke(this, e);
     Console = ((HandleCreatedEventArgs)e).Console;
 }
コード例 #8
0
ファイル: KPopup.cs プロジェクト: qmgindi/Au
 protected virtual void OnHandleCreated()
 {
     HandleCreated?.Invoke();
 }