Esempio n. 1
0
        public UserAudioPlayer(Guid userID, AudioOutWPF parent, bool useWaveEvent = true)
        {
            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                new CompositionContainer(new AssemblyCatalog(Assembly.GetExecutingAssembly())).ComposeParts(this);
            }

            Parent       = parent;
            this.UserID  = userID;
            UseWaveEvent = useWaveEvent;

            User = UserStatusRepo.FindUser(userID);
            UserStatusRepo.Users.CollectionChanged += Users_CollectionChanged;

            aggregator = new FeenPhone.Audio.SampleAggregator()
            {
                PerformFFT = false
            };
            aggregator.NotificationCount = 882;
            aggregator.PerformFFT        = true;

            VisSource = new AudioVisualizationSource(aggregator);

            LastReceived = DateTime.UtcNow;
        }
        private static void OnLevelDbChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AudioVisualizationSource target = d as AudioVisualizationSource;

            if (target != null)
            {
                if (target.LevelDbChanged != null)
                {
                    target.LevelDbChanged(target, e);
                }
            }
        }
Esempio n. 3
0
        public UserAudioPlayer(Guid userID, AudioOutWPF parent, bool useWaveEvent = true)
        {
            if (!DesignerProperties.GetIsInDesignMode(this))
                new CompositionContainer(new AssemblyCatalog(Assembly.GetExecutingAssembly())).ComposeParts(this);

            Parent = parent;
            this.UserID = userID;
            UseWaveEvent = useWaveEvent;

            User = UserStatusRepo.FindUser(userID);
            UserStatusRepo.Users.CollectionChanged += Users_CollectionChanged;

            aggregator = new FeenPhone.Audio.SampleAggregator() { PerformFFT = false };
            aggregator.NotificationCount = 882;
            aggregator.PerformFFT = true;

            VisSource = new AudioVisualizationSource(aggregator);

            LastReceived = DateTime.UtcNow;
        }
Esempio n. 4
0
        public AudioInWPF()
        {
            if (!DesignerProperties.GetIsInDesignMode(this))
                new CompositionContainer(new AssemblyCatalog(Assembly.GetExecutingAssembly())).ComposeParts(this);

            InitializeComponent();
            DataContext = this;
            InitializeInputDevices();
            PopulateCodecsCombo();

            LoadSettings();
            Settings.AppClosing += Settings_SaveSettings;

            AudioEvents.OnAudioDeviceAdded += AudioEvents_OnAudioDeviceAdded;
            AudioEvents.OnAudioDeviceRemoved += AudioEvents_OnAudioDeviceRemoved;

            EventSource.OnLoginStatus += EventSource_OnLoginStatus;
            EventSource.OnUserConnected += EventSource_InvokeOnUserConnected;

            aggregator = new FeenPhone.Audio.SampleAggregator() { PerformFFT = false };
            aggregator.NotificationCount = 882;
            aggregator.PerformFFT = true;

            VisSource = new AudioVisualizationSource(aggregator);
        }