You have a typo in your code which results in nothing happening as you are not doing error checking in your code and most probably did not use the debugger -
int j = rawAudio.Lenght - 1;
'Lenght should be 'Length'
To handle errors your code should look something like -
public void Reverse()
{
if (rawAudio == null)
{
Console.WriteLine("Error: My rawAudio array is null.");
return;
}
int length = rawAudio.Length;
if (length == 0)
{
Console.WriteLine("Error: My rawAudio array is empty.");
return;
}
int i = 0;
int j = length - 1;
while (i < j)
{
byte temp = rawAudio[i];
rawAudio[i] = rawAudio[j];
rawAudio[j] = temp;
i++;
j--;
}
}