Лабораторная работа: Audio recorder on visual basic
cmdSave. Enabled = False
WaveReset
Rate = CLng (GetSetting ("AudioRecorder", "StartUp", "Rate", "110025"))
Channels = CInt (GetSetting ("AudioRecorder", "StartUp", "Channels", "1"))
Resolution = CInt (GetSetting ("AudioRecorder", "StartUp", "Resolution", "16"))
WaveFileName = GetSetting ("AudioRecorder", "StartUp", "WaveFileName", "C: \Radio. wav")
WaveAutomaticSave = GetSetting ("AudioRecorder", "StartUp", "WaveAutomaticSave", "True")
WaveRecordingImmediate = True
WaveRecordingReady = False
WaveRecording = False
WavePlaying = False
'Be sure to change the Value property of the appropriate button!!
'if you change the default values!
WaveSet
frmSettings. optRecordImmediate. Value = True
frmSettings. Show vbModal
End Sub
Private Sub cmdStop_Click ()
WaveStop
cmdSave. Enabled = True 'Enable the "SAVE AS" button
cmdPlay. Enabled = True 'Enable the "PLAY" button
cmdStop. Enabled = False 'Disable the "STOP" button
If WavePosition = 0 Then
Slider1. Max = 10
Else
If WaveRecordingImmediate And (Not WavePlaying) Then Slider1. Max = WavePosition
If (Not WaveRecordingImmediate) And WaveRecording Then Slider1. Max = WavePosition
End If
If WaveRecording Then WaveRecordingReady = True