In a Class Module I have the following Sub:
Now in a BAS Module I have a similar Sub:
OK, now in the Form I have the following call statements:
OK, now when I compile the project the compiler makes no complaints about the first call to the Class sub but it does about the call to the BAS module sub:
Type Mismatch: array or used-defined type expected
Question:
Why the compiler error on SaveOutStreamBuffer Index, ExData(Index)
Code:
Public Sub SaveStreamBuffer(StreamIdx As Integer, recBuffer() As Byte)
' Saves A Record Buffer To A Record Buffer Array
' If Buffer Is Free
If (LenB(MidB(PlayWaveBuffer.Stream(StreamIdx).Waves(CurRecPos(StreamIdx)).Data, 1)) < 3) Then
PlayWaveBuffer.Stream(StreamIdx).Waves(CurRecPos(StreamIdx)).Data = recBuffer ' Copy Buffer From Rec
IncBufferPointer CurRecPos(StreamIdx) ' Increment Buffer Pointer To Next Free Position...
End If ' Else Ignore Buffer Data
End Sub
Code:
Public Sub SaveOutStreamBuffer(StreamIdx As Integer, OutBuffer() As Byte)
'
' Similar code but the code is not the issue
'
End Sub
Code:
'
'
Static ExData(MAXTCP) As Byte 'Variant ' Extra bytes from frame buffer
ExData(Index) = MidB(ExData(Index), 1) & MidB(WaveData, 1) ' Sync wave bits...
wStream.SaveStreamBuffer Index, ExData(Index) ' Save the current wave data to the wave buffer
SaveOutStreamBuffer Index, ExData(Index) ' Save the current wave data to the wave buffer
wStream.AddStreamToQueue Index ' Queue the current wave stream
ExBytes(Index) = 0 ' Clear Extra byte count
'
'
Type Mismatch: array or used-defined type expected
Question:
Why the compiler error on SaveOutStreamBuffer Index, ExData(Index)