sharpdx / SharpDX-Samples

Official repository for all SharpDX Samples
346 stars 222 forks source link

Can AudioDecoder.cs GetSamples return byte[] instead of Datapointer? #37

Closed soundprojects closed 8 years ago

soundprojects commented 8 years ago

Hi,

I am looking to use SharpDX to decode an audio file to use the result as input for a AudioFrameInputNode. This node functions very similar to a streaming SourceVoice.

This article uses the IMFSourcereader to create a byte array but the AudioDecoder in SharpDX creates an IEnumerable of datapointers.

Would it be possible to add a method GetSamplesAsBytes to AudioDecoder.cs? Or is there a simple way of converting a datapointer to a byte[] using managed code?

Thanks