S
Stephen
Hi
I am trying to duplicate the functionality of a vb function in a c#
function, but I am having no luck. I have never worked with vb, so it
is all new to me. My main problem seems to be duplicating the FileGet
call.
Thanks heaps for any help you can give me on this problem
Stephen
FileOpen(WaveFile, WaveFileName, OpenMode.Binary)
ReDim Y(NumSamples - 1, NumChannels - 1)
If BitsPerSample = 8 Then
Dim ybyte(NumChannels - 1, NumSamples - 1) As Byte
FileGet(WaveFile, ybyte) ' read data in one go
For i = 0 To NumSamples - 1
For c = 0 To NumChannels - 1
Y(i, c) = (ybyte(c, i) - 128) / 128# '8 Bits/sample is unsigned
Next
Next
End If
I am trying to duplicate the functionality of a vb function in a c#
function, but I am having no luck. I have never worked with vb, so it
is all new to me. My main problem seems to be duplicating the FileGet
call.
Thanks heaps for any help you can give me on this problem
Stephen
FileOpen(WaveFile, WaveFileName, OpenMode.Binary)
ReDim Y(NumSamples - 1, NumChannels - 1)
If BitsPerSample = 8 Then
Dim ybyte(NumChannels - 1, NumSamples - 1) As Byte
FileGet(WaveFile, ybyte) ' read data in one go
For i = 0 To NumSamples - 1
For c = 0 To NumChannels - 1
Y(i, c) = (ybyte(c, i) - 128) / 128# '8 Bits/sample is unsigned
Next
Next
End If