Esempio n. 1
0
        private async Task <bool> PlayDirectory()
        {
            try
            {
                IRecording     recording  = new Recording();
                IList <string> audioFiles = await recording.GetCreatedAudioFiles();

                ProcessWaveFile pwf   = new ProcessWaveFile();
                var             files = await pwf.GetReadTimes(audioFiles);

                if (audioFiles != null && audioFiles.Count > 0)
                {
                    foreach (File file in files)
                    {
                        await recording.Play(file.FileName);

                        await Task.Delay(file.PlayTime);
                    }
                }

                await recording.CleanOldFiles();
            }
            catch (Exception e)
            {
                throw e;
            }

            return(true); //HACK!!
        }
Esempio n. 2
0
        private async void BuildAudio(StorageFile audio)
        {
            try
            {
                ProcessWaveFile pwf      = new ProcessWaveFile();
                Wave            waveFile = await pwf.ProcessWaveOld(audio.Path);

                BuildChart(waveFile);
            }
            catch (Exception e)
            {
                throw e;
            }
        }