home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
- Object = "{543E41AF-DEA2-11D2-AC41-00C0DFE9A30F}#2.0#0"; "BWMP31OCX.OCX"
- Begin VB.Form Form1
- Caption = "BW MP3 OCX - Sample project"
- ClientHeight = 3660
- ClientLeft = 165
- ClientTop = 735
- ClientWidth = 7620
- LinkTopic = "Form1"
- ScaleHeight = 3660
- ScaleWidth = 7620
- StartUpPosition = 3 'Windows Default
- Begin BWMP3OCX10.BWMP3 BWMP31
- Left = 5040
- Top = 2760
- _ExtentX = 1005
- _ExtentY = 979
- PiPriority = 0
- End
- Begin ComctlLib.Slider Slider1
- Height = 495
- Left = 1800
- TabIndex = 27
- Top = 2640
- Width = 2655
- _ExtentX = 4683
- _ExtentY = 873
- _Version = 327682
- Max = 100
- End
- Begin VB.Timer Timer1
- Interval = 1000
- Left = 4440
- Top = 1920
- End
- Begin VB.Frame Frame1
- Caption = "Output"
- Height = 1575
- Left = 4320
- TabIndex = 11
- Top = 120
- Width = 3135
- Begin VB.TextBox Text1
- Height = 285
- Left = 480
- TabIndex = 15
- Top = 1200
- Width = 2535
- End
- Begin VB.OptionButton Option3
- Caption = "Wave file"
- Height = 255
- Left = 120
- TabIndex = 14
- Top = 840
- Width = 1455
- End
- Begin VB.OptionButton Option2
- Caption = "DirectSound"
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 600
- Width = 1455
- End
- Begin VB.OptionButton Option1
- Caption = "Wavemapper"
- Height = 255
- Left = 120
- TabIndex = 12
- Top = 360
- Value = -1 'True
- Width = 1455
- End
- Begin VB.Label Label7
- Caption = "File"
- Height = 255
- Left = 120
- TabIndex = 16
- Top = 1200
- Width = 375
- End
- End
- Begin VB.CommandButton Command5
- Caption = "Resume"
- Height = 495
- Left = 120
- TabIndex = 4
- Top = 2520
- Width = 1575
- End
- Begin VB.CommandButton Command4
- Caption = "Pause"
- Height = 495
- Left = 120
- TabIndex = 3
- Top = 1920
- Width = 1575
- End
- Begin VB.CommandButton Command3
- Caption = "Stop"
- Height = 495
- Left = 120
- TabIndex = 2
- Top = 1320
- Width = 1575
- End
- Begin VB.CommandButton Command2
- Caption = "Play"
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 720
- Width = 1575
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 5160
- Top = 1920
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Begin VB.CommandButton Command1
- Caption = "Open MP3"
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1575
- End
- Begin VB.Label Label21
- Height = 255
- Left = 3000
- TabIndex = 31
- Top = 1800
- Width = 1335
- End
- Begin VB.Label Label20
- Caption = "Stereo mode :"
- Height = 255
- Left = 1920
- TabIndex = 30
- Top = 1800
- Width = 1095
- End
- Begin VB.Label Label19
- Height = 255
- Left = 840
- TabIndex = 29
- Top = 3120
- Width = 3735
- End
- Begin VB.Label Label18
- Caption = "Status :"
- Height = 255
- Left = 120
- TabIndex = 28
- Top = 3120
- Width = 615
- End
- Begin VB.Label Label17
- Height = 255
- Left = 2880
- TabIndex = 26
- Top = 1080
- Width = 1455
- End
- Begin VB.Label Label16
- Caption = "Time length : "
- Height = 255
- Left = 1920
- TabIndex = 25
- Top = 1080
- Width = 975
- End
- Begin VB.Label Label15
- Height = 255
- Left = 3000
- TabIndex = 24
- Top = 1560
- Width = 1215
- End
- Begin VB.Label Label14
- Caption = "Time position : "
- Height = 255
- Left = 1920
- TabIndex = 23
- Top = 1560
- Width = 1095
- End
- Begin VB.Label Label13
- Height = 255
- Left = 2640
- TabIndex = 22
- Top = 1320
- Width = 1575
- End
- Begin VB.Label Label12
- Caption = "Position :"
- Height = 255
- Left = 1920
- TabIndex = 21
- Top = 1320
- Width = 735
- End
- Begin VB.Label Label11
- Height = 255
- Left = 2640
- TabIndex = 20
- Top = 840
- Width = 1455
- End
- Begin VB.Label Label10
- Caption = "Length :"
- Height = 255
- Left = 1920
- TabIndex = 19
- Top = 840
- Width = 735
- End
- Begin VB.Label Label9
- Height = 255
- Left = 2880
- TabIndex = 18
- Top = 600
- Width = 1215
- End
- Begin VB.Label Label8
- Caption = "Frequency : "
- Height = 255
- Left = 1920
- TabIndex = 17
- Top = 600
- Width = 975
- End
- Begin VB.Label Label6
- Height = 1095
- Left = 960
- TabIndex = 10
- Top = 3360
- Width = 3375
- End
- Begin VB.Label Label5
- Height = 255
- Left = 2520
- TabIndex = 9
- Top = 360
- Width = 1575
- End
- Begin VB.Label Label4
- Caption = "Layer : "
- Height = 255
- Left = 1920
- TabIndex = 8
- Top = 360
- Width = 615
- End
- Begin VB.Label Label3
- Height = 255
- Left = 2520
- TabIndex = 7
- Top = 120
- Width = 1575
- End
- Begin VB.Label Label2
- Caption = "Bitrate : "
- Height = 255
- Left = 1920
- TabIndex = 6
- Top = 120
- Width = 615
- End
- Begin VB.Label Label1
- Caption = "Errorcode :"
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 3360
- Width = 855
- End
- Begin VB.Menu about
- Caption = "About"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub about_Click()
- BWMP31.about
- End Sub
- Private Sub BWMP31_PlaybackFinished()
- Form1.Caption = "Finished" 'this event is raised at the end of the playback
- End Sub
- Private Sub BWMP31_PlayerMode(ModeNumber As Long, modeDescription As String)
- Label19.Caption = modeDescription 'this event is raised in every change in the playback mode
- End Sub
- Private Sub BWMP31_ReturnError(ErrorCode As Long, ErrorDescription As String)
- Label6.Caption = ErrorDescription 'This event is raised in any exception
- End Sub
- Private Sub Command1_Click()
- Label6.Caption = "" ' cleaning the errorcode label
- Dim ret As Long
- CommonDialog1.ShowOpen
- BWMP31.OpenMP3 CommonDialog1.filename
- 'The following commands retrieves the information about the MP3 file
- Label3.Caption = BWMP31.GetBitRate
- Label5.Caption = BWMP31.GetLayer
- Label9.Caption = BWMP31.GetFrequency
- Label11.Caption = BWMP31.GetLength
- Label17.Caption = BWMP31.GetTimeLength
- Label21.Caption = BWMP31.GetMP3StereoMode
- End Sub
- Private Sub Command2_Click()
- Form1.Caption = ""
- Label6.Caption = "" ' cleaning the errorcode label
- 'The following command plays the MP3 file , and you can select also the start position and the end position
- 'To play from 10000 to 30000 -> BWMP31.PlayMP3 10000, 30000
- BWMP31.PlayMP3
- End Sub
- Private Sub Command3_Click()
- Label6.Caption = "" ' cleaning the errorcode label
- BWMP31.StopMP3
- End Sub
- Private Sub Command4_Click()
- Label6.Caption = "" ' cleaning the errorcode label
- BWMP31.PauseMP3
- End Sub
- Private Sub Command5_Click()
- Label6.Caption = "" ' cleaning the errorcode label
- BWMP31.ResumeMP3
- End Sub
- Private Sub Option1_Click()
- Option2.Value = False
- Option3.Value = False
- BWMP31.OutPutDeviceType = WaveMapper
- End Sub
- Private Sub Option2_Click()
- Option1.Value = False
- Option3.Value = False
- BWMP31.OutPutDeviceType = DirectSound
- End Sub
- Private Sub Option3_Click()
- Option1.Value = False
- Option2.Value = False
- BWMP31.OutPutDeviceType = PCMFile 'in order to extract the MP3 file to a Wav file , you need to provide a outputfile , or an error will occur
- Text1.Enabled = True
- End Sub
- Private Sub Slider1_Scroll()
- Timer1.Enabled = False
- BWMP31.SetSliderPosition Slider1.Value
- Timer1.Enabled = True
- End Sub
- Private Sub Text1_Change()
- BWMP31.SetOutPutFile (Text1.Text)
- End Sub
- Private Sub Timer1_Timer()
- On Error Resume Next
- Label13.Caption = BWMP31.GetPosition
- Label15.Caption = BWMP31.GetTimePosition
- Slider1.Value = BWMP31.GetSliderPosition
- End Sub
-