Convert .WAV file in-memory to byte Array [C#]

Adrian 1 Reputation point
2022-12-20T14:19:40.597+00:00

Hi,

I have seen documentation to convert a .WAV file to a byte array using File.ReadAllBytes(//filePath).

I have a .WAV file saved to a variable in my program which is microphone input from the user. I would like to avoid I/O operations if a solution to convert a variable in memory into a byte array is possible.

Thank you for your time.

Community Center Not monitored
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.