Dim intDat As Integer
Dim intBit As Integer
Dim intFrequenz As Long
Dim intChannel As Integer
Dim strFrq As String
Dim strBit As String
Dim strChannel As String
On Error GoTo Fehler
intDat = FreeFile
Open FileName$ For Binary As intDat
Get intDat, 25, intFrequenz
If intFrequenz = 44100 Then
lblHz.Caption = FormatNumber(intFrequenz, 0) & " Hz"
Else
lblHz.Caption = FormatNumber(intFrequenz, 0) & " Hz"
End If
Get intDat, 35, intBit
If intBit = 16 Then
lblBitRate.Caption = intBit & "-Bit"
Else
lblBitRate.Caption = intBit & "-Bit"
End If
Get intDat, 23, intChannel
If intChannel = 2 Then
lblChannels.Caption = "Stereo"
Else
lblChannels.Caption = "Mono"
End If
Close intDat
Exit Sub
Fehler:
Close intDat
MsgBox ("Error analyzing File, perhaps no valid WAVE-File !"), vbCritical, "Error"