Example #1
0
        async void fileInput_FileCompleted(AudioFileInputNode fileInput, object args)
        {
            try
            {
                await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    try
                    {
                        fileInput.Reset();                         // Reset the file input node so starting the graph will resume playback from beginning of the file
                        _fileInputs.Remove(fileInput);
                        notifyUser($"Disposing: {fileInput.SourceFile.Name} ");
                        fileInput.Dispose();                                   /**/

                        if (_fileInputs.Count() == 0)
                        {
                            _graph.Stop();
                            notifyUser("All Done!!! ");
                        }
                    }
                    catch (Exception ex) { notifyUser(ex.Message); }
                });

                await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { notifyUser("End of file reached"); });
            }
            catch (Exception ex) { notifyUser(ex.Message); }
        }
Example #2
0
 // Event handler for file completion event
 private void FileInput_FileCompleted(AudioFileInputNode sender, object args)
 {
     // File playback is done. Stop the graph
     _graph.Stop();
     // Reset the file input node so starting the graph will resume playback from beginning of the file
     sender.Reset();
 }
Example #3
0
 static void playNode(AudioFileInputNode node)
 {
     if (node == null)
     {
         return;
     }
     node.Reset();
     node.Start();
 }
        // Event handler for file completion event
        private async void FileInput_FileCompleted(AudioFileInputNode sender, object args)
        {
            // File playback is done. Stop the graph
            graph.Stop();

            // Reset the file input node so starting the graph will resume playback from beginning of the file
            sender.Reset();

            await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                rootPage.NotifyUser("End of file reached", NotifyType.StatusMessage);
                graphButton.Content = "Start Graph";
            });
        }
        // Event handler for file completion event
        private async void FileInput_FileCompleted(AudioFileInputNode sender, object args)
        {
            // File playback is done. Stop the graph
            graph.Stop();

            // Reset the file input node so starting the graph will resume playback from beginning of the file
            sender.Reset();

            await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                rootPage.NotifyUser("End of file reached", NotifyType.StatusMessage);
                graphButton.Content = "Start Graph";
            });
        }
Example #6
0
        private async void FileInput_FileCompleted(AudioFileInputNode sender, object args)
        {
            // File playback is done. Stop the graph
            graph.Stop();

            // Reset the file input node so starting the graph will resume playback from beginning of the file
            sender.Reset();
        }