Guidance
指路人
g.yi.org
software / rapidq / Examples / Audio & Video / akrip32 / Example_Akrip32.rqb

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $INCLUDE "akrip32.inc"

     DECLARE SUB AddCdList
     DECLARE SUB Extract

     CREATE Form AS QFORM
      CAPTION = "AkRip32 example"
      Width = 263
      Height = 200
      Center
      borderstyle = 3
      onshow = addcdlist
      CREATE Label1 AS QLABEL
       CAPTION = "Extract Track"
       Left = 8
       Top = 80
       Width = 96
      END CREATE
      CREATE Label2 AS QLABEL
       CAPTION = "Destination file"
       Left = 8
       Top = 120
       Width = 80
       Transparent = 1
      END CREATE
      CREATE OvalBtn1 AS QOVALBTN
       CAPTION = "Go !"
       Left = 169
       Top = 68
       Width = 76
       Height = 34
       onclick = extract
      END CREATE
      CREATE ListBox AS QLISTBOX
       Left = 8
       Top = 10
       width = 238
       height = 50
      END CREATE
      CREATE Edit1 AS QEDIT
       Left = 96
       Top = 72
       Width = 57
       TabOrder = 3
      END CREATE
      CREATE Edit2 AS QEDIT
       Left = 96
       Top = 112
       Width = 145
       TabOrder = 4
      END CREATE
      CREATE GAuge AS QGAUGE
       align = 2
       forecolor = RGB(0,0,255)
       backcolor = RGB(225,225,225)
       height = 22
       borderstyle = 0
       min = 0
       max = 100
      END CREATE
     END CREATE


     Form.SHOWMODAL


'______________________________________________________________________________
     SUB AddCdList
      Listbox.clear

      DIM DrivesCount AS LONG
      DrivesCount = AKRIPQ_GetCdList

      DIM Cdinfo AS AKRIPQ_CDREC

      DIM i AS INTEGER
      i = 0

      DO
       AKRIPQ_GetCdInfo(i, Cdinfo)
       Listbox.additems(Cdinfo.id)

       INC(i)
      LOOP UNTIL i = DrivesCount
     END SUB

'______________________________________________________________________________
     SUB Extract
' 1) Get the selected drive handle
      DIM CdHandle AS LONG
      CdHandle = AKRIPQ_GetCdHandle(listbox.itemindex)

' 2) Read the TOC (Table of contents)
      DIM TOC AS AKRIPQ_TOCINFO
      AKRIPQ_ReadToc(CdHandle, TOC)

'3) Save the track
      AKRIPQ_Savetrack (CdHandle, VAL(edit1.text), edit2.text)

      SHOWMESSAGE "Done !"
      Gauge.position = 0
      Form.CAPTION = "AkRip32 example"
     END SUB

'______________________________________________________________________________

' Note that this function has been declared in the AkRip32.infc file. It will
' be called at the end of each reading cycle, during extraction. So it can be
' used to retrieve extraction status. Some useful variables that you could
' need are:
'
' AKRIPQ_Percentagedone
' AKRIPQ_FramesTotal
' AKRIPQ_FramesDone
' AKRIPQ_FramesLeft


     FUNCTION AKRIPQ_Callback
      Gauge.position = AKRIPQ_PercentageDone
      Form.CAPTION =  "Frame " & STR$(AKRIPQ_FramesDone) & " of " & _
       STR$(AKRIPQ_FramesTotal) & ". " & STR$(AKRIPQ_FramesLeft) & _
       " left"
     END FUNCTION
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2024-3-28  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-12-11 12:49:56