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.
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);
- it doesn't play audio files
- it doesn't support any other audio formats, except WAV
- it doesn't read frame samples