c# - Play from a memory stream(which doesn't contain wav headers) in WPF -


i try concatenate data in different durations same sample rate. concatenate data memorystream.copyto(memorystream) method.

is there way play data memory stream don't have wav header in start?

and if not, there way append wav headers to start after stream appended?

(i want avoid generating file in disk..)

to naudio, use rawsourcewavestream , pass in memorystream containing raw concatenated audio constructor. you'll need explicitly specify waveformat is.

memorystream = ... // construct audio memorystream.position = 0; // rewind beginning var rs = new rawsourcewavestream(memorystream, new waveformat(samplerate, 16, 1)); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -