diff --git a/FFMpegCore.Test/AudioTest.cs b/FFMpegCore.Test/AudioTest.cs index f1abb72..b6fde77 100644 --- a/FFMpegCore.Test/AudioTest.cs +++ b/FFMpegCore.Test/AudioTest.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using FFMpegCore.Extend; namespace FFMpegCore.Test { diff --git a/FFMpegCore/Extend/PcmAudioSampleWrapper.cs b/FFMpegCore/Extend/PcmAudioSampleWrapper.cs index d67038b..503a23f 100644 --- a/FFMpegCore/Extend/PcmAudioSampleWrapper.cs +++ b/FFMpegCore/Extend/PcmAudioSampleWrapper.cs @@ -1,27 +1,30 @@ -using FFMpegCore.Pipes; -using System.IO; +using System.IO; using System.Threading; using System.Threading.Tasks; +using FFMpegCore.Pipes; -public class PcmAudioSampleWrapper : IAudioSample +namespace FFMpegCore.Extend { - //This could actually be short or int, but copies would be inefficient. - //Handling bytes lets the user decide on the conversion, and abstract the library - //from handling shorts, unsigned shorts, integers, unsigned integers and floats. - private readonly byte[] _sample; - - public PcmAudioSampleWrapper(byte[] sample) + public class PcmAudioSampleWrapper : IAudioSample { - _sample = sample; - } + //This could actually be short or int, but copies would be inefficient. + //Handling bytes lets the user decide on the conversion, and abstract the library + //from handling shorts, unsigned shorts, integers, unsigned integers and floats. + private readonly byte[] _sample; - public void Serialize(Stream stream) - { - stream.Write(_sample, 0, _sample.Length); - } + public PcmAudioSampleWrapper(byte[] sample) + { + _sample = sample; + } - public async Task SerializeAsync(Stream stream, CancellationToken token) - { - await stream.WriteAsync(_sample, 0, _sample.Length, token); + public void Serialize(Stream stream) + { + stream.Write(_sample, 0, _sample.Length); + } + + public async Task SerializeAsync(Stream stream, CancellationToken token) + { + await stream.WriteAsync(_sample, 0, _sample.Length, token); + } } }