Self-taught c# programmer and have been searching google for a solution to find out if pcm alaw is mono or stereo with no luck. I've written this simple code which seems to work but looking for advice if this is a suitable way to determine the channel information. Any advice or direction is appreciated.
private bool IsStereo
{
get
{
int i = 0;
for (int j = 0; j < m_Samples.Length / 2; j++)
{
float left = m_Samples[j];
float right = m_Samples[j + 1];
if (left.Equals(right))
i++;
}
return i == Samples / 2;
}
}