The core components for the NextAudio library.
$ dotnet add package NextAudioCreate audio apps without headache in the .NET ecosystem.
This library allows you to create audio apps without a lot of headache existing in the "audio topic"
See Documentation
You can add this lib via nuget package manager.
dotnet cli example:
dotnet add package NextAudio
OBS: This install only the core lib. The individual components may also be installed from NuGet.
The stable builds are available from NuGet.
The development builds are availabe from Myget feed https://www.myget.org/F/next-audio/api/v3/index.json.
These builds target the main branch.
The lib will always use audio frame buffers for read/write operations.
This makes the streaming data very easy.
using var output = new MemoryStream();
using var file = AudioStream.CreateFromFile("test1.mkv");
using var demuxer = new MatroskaDemuxer(file);
var bytesRead = 0;
Span<byte> buffer = new byte[1024];
while ((bytesRead = demuxer.Demux(buffer)) > 0)
{
// Always slice the buffer to bytesRead,
// the lib always will return an audio frame
// when using a read operation.
var frame = buffer.Slice(0, bytesRead);
output.Write(frame);
}
For more usage and guides check the documentation
Span<T>, Memory<T>, ArrayPool and lower GC pressure with ValueTask.Microsoft.Extensions.Logging..snupkg).OBS: Goals will change as new lib versions come out.
AudioStream.CreateFromFile)AudioStream.CreateFromStream but is not persistent)Microsoft.Extensions.DependencyInjectionPipelineWriter/Stream)To contribute to this library follow the Contributing guideline
This project uses the MIT License.
See Code of Conduct