home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4609
/
wavplus
/
segdemo.frm
< prev
next >
Wrap
Text File
|
1994-06-28
|
6KB
|
237 lines
VERSION 2.00
Begin Form SegDemo
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Wav Section Play Demo"
ClientHeight = 3630
ClientLeft = 1095
ClientTop = 1500
ClientWidth = 5910
ControlBox = 0 'False
Height = 4035
Left = 1035
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3630
ScaleWidth = 5910
Top = 1155
Width = 6030
Begin CommandButton CmdPlayFull
BackColor = &H00C0C0C0&
Caption = "&Play Full Wav"
Height = 375
Left = 240
TabIndex = 1
Top = 2760
Width = 5415
End
Begin CommandButton Cmd3pm
BackColor = &H00C0C0C0&
Caption = "3:00 pm"
Height = 375
Left = 3840
TabIndex = 7
Top = 2400
Width = 1815
End
Begin CommandButton Cmd3am
BackColor = &H00C0C0C0&
Caption = "3:00 am"
Height = 375
Left = 3840
TabIndex = 6
Top = 2040
Width = 1815
End
Begin CommandButton Cmd2pm
BackColor = &H00C0C0C0&
Caption = "2:00 pm"
Height = 375
Left = 2040
TabIndex = 5
Top = 2400
Width = 1815
End
Begin CommandButton Cmd2am
BackColor = &H00C0C0C0&
Caption = "2:00 am"
Height = 375
Left = 2040
TabIndex = 4
Top = 2040
Width = 1815
End
Begin CommandButton Cmd1pm
BackColor = &H00C0C0C0&
Caption = "1:00 pm"
Height = 375
Left = 240
TabIndex = 3
Top = 2400
Width = 1815
End
Begin CommandButton Cmd1am
BackColor = &H00C0C0C0&
Caption = "1:00 am"
Height = 375
Left = 240
TabIndex = 2
Top = 2040
Width = 1815
End
Begin CommandButton CmdOkay
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "O &K A Y"
Default = -1 'True
Height = 375
Left = 240
TabIndex = 0
Top = 3120
Width = 5415
End
Begin Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Label1"
Height = 1575
Left = 240
TabIndex = 8
Top = 240
Width = 5415
End
End
Sub Cmd1am_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 0, 899
PlaySegment 3000, 3899
PlaySegment 4000, 4899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub Cmd1pm_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 0, 899
PlaySegment 3000, 3899
PlaySegment 5000, 5899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub Cmd2am_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 1000, 1899
PlaySegment 3000, 3899
PlaySegment 4000, 4899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub Cmd2pm_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 1000, 1899
PlaySegment 3000, 3899
PlaySegment 5000, 5899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub Cmd3am_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 2000, 2799
PlaySegment 3000, 3899
PlaySegment 4000, 4899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub Cmd3pm_Click ()
Screen.MousePointer = 11
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
Answer$ = Space$(255)
WavOpen FullPath$, Answer$
PlaySegment 2000, 2799
PlaySegment 3000, 3899
PlaySegment 5000, 5899
Answer$ = Space$(255)
WavClose Answer$
Screen.MousePointer = 0
End Sub
Sub CmdOkay_Click ()
Unload Me
End Sub
Sub CmdPlayFull_Click ()
FullPath$ = app.Path
FullPath$ = AddSeparator(FullPath$) + "TESTSEG.WAV"
x% = PlayWavNoWait(FullPath$)
End Sub
Sub Form_Load ()
FormCenterForm Me, DemoMain
nl = Chr$(13) + Chr$(10)
msg$ = nl + "This example demonstrates how to play" + nl
msg$ = msg$ + "sections of a WAV file. This procedure" + nl
msg$ = msg$ + "of using composite Wav files can save drive" + nl
msg$ = msg$ + "space. To create new composite Wavs you can use" + nl
msg$ = msg$ + "the MCI Wav Record options in this program or use a" + nl
msg$ = msg$ + "more sophisticated editor to combine existing Wav files."
Label1.Caption = msg$
Screen.MousePointer = 0
End Sub
Sub Form_Paint ()
DoForm3D Me, sunken, 1, 5
DoControl3D Label1, sunken, 1
End Sub
Sub PlaySegment (SegStart%, SegEnd%)
PlayStart$ = Trim$(Str$(SegStart%))
PlayEnd$ = Trim$(Str$(SegEnd%))
Answer$ = Space$(255)
WavStartSectionWait PlayStart$, PlayEnd$, Answer$
End Sub