예제 #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
 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();
 }