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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -