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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -