12345678910111213141516171819202122232425262728293031323334 |
- using Bmp.Core.Playback.Inputs;
- using System.Threading;
- using System;
- using NAudio.Wave;
- using AsioOut = Bmp.Core.Playback.Outputs.NAudioASIO.AsioOut;
- namespace Bmp.Poc.PoCs;
- internal static class PocAsioDFFPlay
- {
- public static void MainFunc()
- {
- var dffFilePath =Const.FileDff;
- var asioDriverName = "Creative SB USB DSD ASIO Device";
- var inputSource = InputSourceProvider.CreateWaveStream(dffFilePath);
- var outputDevice = new AsioOut(asioDriverName);
- outputDevice.SetNativeDsd();
- outputDevice.Init(inputSource);
- outputDevice.Play();
- while (outputDevice.PlaybackState == PlaybackState.Playing)
- {
- Console.WriteLine($"{inputSource.CurrentTime}/{inputSource.TotalTime}");
- Thread.Sleep(3000);
- outputDevice.Pause();
- inputSource.CurrentTime = inputSource.CurrentTime.Add(TimeSpan.FromSeconds(1));
- Thread.Sleep(100);
- outputDevice.Play();
- }
- }
- }
|