Created
December 11, 2019 10:09
-
-
Save DavidKlempfner/bc0b1f14d5a6e88618296f48fc644dfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string forwardsWavFilePath = @"C:\ForwardsWavFile.wav"; | |
byte[] forwardsWavFileStreamByteArray = PopulateForwardsWavFileByteArray(forwardsWavFilePath); | |
private static byte[] PopulateForwardsWavFileByteArray(string forwardsWavFilePath) | |
{ | |
byte[] forwardsWavFileStreamByteArray; | |
using (FileStream forwardsWavFileStream = new FileStream(forwardsWavFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) | |
{ | |
forwardsWavFileStreamByteArray = new byte[forwardsWavFileStream.Length]; | |
forwardsWavFileStream.Read(forwardsWavFileStreamByteArray, 0, (int) forwardsWavFileStream.Length); | |
} | |
return forwardsWavFileStreamByteArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment