niusnet / WavSplitter

C# PCL library to split WAV file into chunks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This simple library allows to split WAV file into chunks limited by size.

This might be helpful when you are going to upload big files by chunks.

It was inspired by NAudio, but current one is PCL and can be used in Xamarin core projects without any platform specific reference.

Implementation is pretty simple and tested on audio file generated by iOS application.

Resulted chunks are valid audio files with full header information.

How to use

Stream input; // WAV file

var limit = 200 * 1024; // new chunk limit in bytes
var splitter = new Splitter (input, limit);

bool hasMore;
do
{
	Stream output; // Stream to write: File, MemoryStream or Web stream

	hasMore = await splitter.ReadNext (output);
} while (hasMore);

What this library DOES NOT do

  • it doesn't play audio files
  • it doesn't support any other audio formats, except WAV
  • it doesn't read frame samples

About

C# PCL library to split WAV file into chunks

License:MIT License


Languages

Language:C# 100.0%