home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / Chip_2003-01_cd2.bin / editors / songs / SoundEngine / vbmp31615.lzh / sample.LZH / frmPLAY.frm (.txt) < prev    next >
Visual Basic Form  |  2000-06-20  |  73KB  |  2,250 lines

  1. VERSION 5.00
  2. Begin VB.Form frmPLAY 
  3.    BorderStyle     =   1  '
  4.    Caption         =   "Sample MP3 Player"
  5.    ClientHeight    =   9135
  6.    ClientLeft      =   2400
  7.    ClientTop       =   2430
  8.    ClientWidth     =   8235
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    OLEDropMode     =   1  '
  13.    ScaleHeight     =   9135
  14.    ScaleWidth      =   8235
  15.    Begin VB.CommandButton Command2 
  16.       Caption         =   "Command2"
  17.       Height          =   315
  18.       Left            =   60
  19.       TabIndex        =   130
  20.       Top             =   5820
  21.       Width           =   315
  22.    End
  23.    Begin VB.CheckBox chkQuickSeek 
  24.       Caption         =   "QuickSeek"
  25.       Height          =   195
  26.       Left            =   3240
  27.       TabIndex        =   129
  28.       Top             =   2280
  29.       Width           =   1215
  30.    End
  31.    Begin VB.CheckBox chkFrameRead 
  32.       Caption         =   "allFrameRead"
  33.       Height          =   195
  34.       Left            =   1800
  35.       TabIndex        =   128
  36.       Top             =   2280
  37.       Width           =   1455
  38.    End
  39.    Begin VB.CommandButton cmdChgWindow 
  40.       Caption         =   "win"
  41.       BeginProperty Font 
  42.          Name            =   "
  43.          Size            =   8.25
  44.          Charset         =   128
  45.          Weight          =   400
  46.          Underline       =   0   'False
  47.          Italic          =   0   'False
  48.          Strikethrough   =   0   'False
  49.       EndProperty
  50.       Height          =   255
  51.       Left            =   7800
  52.       TabIndex        =   127
  53.       Top             =   2220
  54.       Width           =   435
  55.    End
  56.    Begin VB.CommandButton Command1 
  57.       Caption         =   "Lyrics3 Edit"
  58.       Height          =   315
  59.       Left            =   6660
  60.       TabIndex        =   126
  61.       Top             =   2940
  62.       Width           =   1095
  63.    End
  64.    Begin VB.CommandButton cmdTagEdit 
  65.       Caption         =   "Tag Edit"
  66.       Height          =   315
  67.       Left            =   6660
  68.       TabIndex        =   64
  69.       Top             =   2640
  70.       Width           =   1095
  71.    End
  72.    Begin VB.CheckBox chkLyrics3 
  73.       Caption         =   "UseLyrics3"
  74.       Height          =   255
  75.       Left            =   5460
  76.       TabIndex        =   125
  77.       Top             =   3000
  78.       Width           =   1155
  79.    End
  80.    Begin VB.HScrollBar scSoftVol 
  81.       Height          =   135
  82.       LargeChange     =   20
  83.       Left            =   3300
  84.       Max             =   100
  85.       TabIndex        =   123
  86.       Top             =   3120
  87.       Value           =   100
  88.       Width           =   2055
  89.    End
  90.    Begin VB.HScrollBar hscPitch 
  91.       Height          =   135
  92.       LargeChange     =   20
  93.       Left            =   3480
  94.       Max             =   300
  95.       Min             =   50
  96.       TabIndex        =   120
  97.       Top             =   1740
  98.       Value           =   100
  99.       Width           =   3135
  100.    End
  101.    Begin VB.CommandButton cmdFadeOutNow 
  102.       Caption         =   "FadeOut"
  103.       Height          =   255
  104.       Left            =   4020
  105.       TabIndex        =   119
  106.       Top             =   2460
  107.       Width           =   975
  108.    End
  109.    Begin VB.CheckBox chkFadeOut 
  110.       Caption         =   "FadeOut"
  111.       Height          =   195
  112.       Left            =   1800
  113.       TabIndex        =   118
  114.       Top             =   2520
  115.       Width           =   975
  116.    End
  117.    Begin VB.CheckBox chkFadeIn 
  118.       Caption         =   "FadeIn"
  119.       Height          =   195
  120.       Left            =   2880
  121.       TabIndex        =   117
  122.       Top             =   2520
  123.       Width           =   975
  124.    End
  125.    Begin VB.CommandButton cmdx3 
  126.       Caption         =   "x3"
  127.       Height          =   315
  128.       Left            =   4980
  129.       TabIndex        =   114
  130.       Top             =   1920
  131.       Width           =   375
  132.    End
  133.    Begin VB.CommandButton cmdx2 
  134.       Caption         =   "x2"
  135.       Height          =   315
  136.       Left            =   4500
  137.       TabIndex        =   116
  138.       Top             =   1920
  139.       Width           =   495
  140.    End
  141.    Begin VB.CommandButton cmdNomal 
  142.       Caption         =   "x1"
  143.       Height          =   315
  144.       Left            =   4140
  145.       TabIndex        =   115
  146.       Top             =   1920
  147.       Width           =   375
  148.    End
  149.    Begin VB.TextBox txtPitch 
  150.       Alignment       =   1  '
  151.       Height          =   270
  152.       Left            =   960
  153.       TabIndex        =   112
  154.       Text            =   "100"
  155.       Top             =   1680
  156.       Width           =   615
  157.    End
  158.    Begin VB.CommandButton cmdEncode 
  159.       Caption         =   "encode"
  160.       Height          =   375
  161.       Left            =   720
  162.       TabIndex        =   111
  163.       Top             =   120
  164.       Width           =   855
  165.    End
  166.    Begin VB.CommandButton btFileInfo 
  167.       Caption         =   "FileInfo"
  168.       Height          =   315
  169.       Left            =   5400
  170.       TabIndex        =   65
  171.       Top             =   2640
  172.       Width           =   1215
  173.    End
  174.    Begin VB.CommandButton cmdGE 
  175.       Caption         =   "GraphicEQ"
  176.       Height          =   315
  177.       Left            =   5400
  178.       TabIndex        =   110
  179.       Top             =   2340
  180.       Width           =   1215
  181.    End
  182.    Begin VB.CommandButton cmdChgSecFlame 
  183.       Caption         =   "s/frm/smp"
  184.       Height          =   255
  185.       Left            =   7080
  186.       TabIndex        =   109
  187.       Top             =   1040
  188.       Width           =   1095
  189.    End
  190.    Begin VB.Timer TimeView 
  191.       Enabled         =   0   'False
  192.       Left            =   7680
  193.       Top             =   600
  194.    End
  195.    Begin VB.CommandButton cmdGetVol 
  196.       Caption         =   "get"
  197.       Height          =   195
  198.       Left            =   1800
  199.       TabIndex        =   108
  200.       Top             =   3060
  201.       Width           =   435
  202.    End
  203.    Begin VB.PictureBox picWaveFrm 
  204.       Height          =   615
  205.       Left            =   6720
  206.       ScaleHeight     =   555
  207.       ScaleWidth      =   1395
  208.       TabIndex        =   106
  209.       Top             =   1560
  210.       Width           =   1455
  211.       Begin VB.PictureBox picWave 
  212.          Appearance      =   0  '
  213.          AutoRedraw      =   -1  'True
  214.          BackColor       =   &H00FFFFFF&
  215.          BorderStyle     =   0  '
  216.          ForeColor       =   &H80000008&
  217.          Height          =   555
  218.          Left            =   0
  219.          ScaleHeight     =   555
  220.          ScaleWidth      =   1395
  221.          TabIndex        =   107
  222.          Top             =   0
  223.          Width           =   1395
  224.          Begin VB.Line lineCenter 
  225.             BorderColor     =   &H80000001&
  226.             X1              =   -120
  227.             X2              =   1560
  228.             Y1              =   277
  229.             Y2              =   277
  230.          End
  231.       End
  232.    End
  233.    Begin VB.CommandButton cmdDecodeWave 
  234.       Caption         =   "decodeWave"
  235.       Height          =   315
  236.       Left            =   5400
  237.       TabIndex        =   105
  238.       Top             =   2040
  239.       Width           =   1215
  240.    End
  241.    Begin VB.TextBox txtOutSleep 
  242.       Alignment       =   1  '
  243.       Height          =   270
  244.       Left            =   960
  245.       TabIndex        =   103
  246.       Text            =   "10"
  247.       Top             =   3420
  248.       Width           =   615
  249.    End
  250.    Begin VB.CommandButton cmdSiEdit 
  251.       Caption         =   "SI Edit"
  252.       Height          =   315
  253.       Left            =   6660
  254.       TabIndex        =   98
  255.       Top             =   2340
  256.       Width           =   1095
  257.    End
  258.    Begin VB.CommandButton cmdGetList 
  259.       Caption         =   "ListInfo"
  260.       Height          =   375
  261.       Left            =   120
  262.       TabIndex        =   66
  263.       Top             =   6240
  264.       Width           =   1095
  265.    End
  266.    Begin VB.CommandButton cmdGenreGet 
  267.       Caption         =   "GetGenre"
  268.       Height          =   255
  269.       Left            =   1800
  270.       TabIndex        =   61
  271.       Top             =   3720
  272.       Width           =   975
  273.    End
  274.    Begin VB.TextBox txtGenreNo 
  275.       Height          =   270
  276.       Left            =   2880
  277.       TabIndex        =   60
  278.       Text            =   "0"
  279.       Top             =   3720
  280.       Width           =   495
  281.    End
  282.    Begin VB.TextBox txtInSleep 
  283.       Alignment       =   1  '
  284.       Height          =   270
  285.       Left            =   960
  286.       TabIndex        =   48
  287.       Text            =   "30"
  288.       Top             =   3180
  289.       Width           =   615
  290.    End
  291.    Begin VB.TextBox txtOutFlame 
  292.       Alignment       =   1  '
  293.       Height          =   270
  294.       Left            =   960
  295.       TabIndex        =   49
  296.       Text            =   "16"
  297.       Top             =   2940
  298.       Width           =   615
  299.    End
  300.    Begin VB.CommandButton cmdDecGet 
  301.       Caption         =   "Get!"
  302.       Height          =   255
  303.       Left            =   960
  304.       TabIndex        =   43
  305.       Top             =   2040
  306.       Width           =   615
  307.    End
  308.    Begin VB.CommandButton cmdOptSam 
  309.       Caption         =   "Set!"
  310.       Height          =   255
  311.       Left            =   240
  312.       TabIndex        =   42
  313.       Top             =   2040
  314.       Width           =   615
  315.    End
  316.    Begin VB.TextBox txtFre 
  317.       Alignment       =   1  '
  318.       Height          =   270
  319.       Left            =   960
  320.       TabIndex        =   44
  321.       Text            =   "24000"
  322.       Top             =   1440
  323.       Width           =   615
  324.    End
  325.    Begin VB.TextBox txtChan 
  326.       Alignment       =   1  '
  327.       Height          =   270
  328.       Left            =   960
  329.       TabIndex        =   45
  330.       Text            =   "0"
  331.       Top             =   1200
  332.       Width           =   615
  333.    End
  334.    Begin VB.CommandButton cmdVbmp3Opt 
  335.       Caption         =   "Set!"
  336.       Height          =   255
  337.       Left            =   240
  338.       TabIndex        =   51
  339.       Top             =   3780
  340.       Width           =   615
  341.    End
  342.    Begin VB.TextBox txtInFlame 
  343.       Alignment       =   1  '
  344.       Height          =   270
  345.       Left            =   960
  346.       TabIndex        =   50
  347.       Text            =   "32"
  348.       Top             =   2700
  349.       Width           =   615
  350.    End
  351.    Begin VB.CommandButton cmdVbmp3Get 
  352.       Caption         =   "Get!"
  353.       Height          =   255
  354.       Left            =   960
  355.       TabIndex        =   47
  356.       Top             =   3780
  357.       Width           =   615
  358.    End
  359.    Begin VB.TextBox txtSam 
  360.       Alignment       =   1  '
  361.       Height          =   270
  362.       Left            =   960
  363.       TabIndex        =   46
  364.       Text            =   "0"
  365.       Top             =   960
  366.       Width           =   615
  367.    End
  368.    Begin VB.CommandButton btMpegInfo 
  369.       Caption         =   "MpegInfo"
  370.       Height          =   375
  371.       Left            =   5280
  372.       TabIndex        =   40
  373.       Top             =   3420
  374.       Width           =   1335
  375.    End
  376.    Begin VB.CommandButton btTagInfo 
  377.       Caption         =   "TagInfo"
  378.       Height          =   375
  379.       Left            =   120
  380.       TabIndex        =   27
  381.       Top             =   4200
  382.       Width           =   1335
  383.    End
  384.    Begin VB.HScrollBar scSeek 
  385.       Height          =   135
  386.       Left            =   1800
  387.       Max             =   0
  388.       TabIndex        =   25
  389.       Top             =   1560
  390.       Width           =   4815
  391.    End
  392.    Begin VB.HScrollBar scRVol 
  393.       Height          =   135
  394.       LargeChange     =   20
  395.       Left            =   3300
  396.       Max             =   100
  397.       TabIndex        =   21
  398.       Top             =   2940
  399.       Value           =   100
  400.       Width           =   2055
  401.    End
  402.    Begin VB.HScrollBar scLVol 
  403.       Height          =   135
  404.       LargeChange     =   20
  405.       Left            =   3300
  406.       Max             =   100
  407.       TabIndex        =   20
  408.       Top             =   2760
  409.       Value           =   100
  410.       Width           =   2055
  411.    End
  412.    Begin VB.TextBox txtFile 
  413.       Height          =   270
  414.       Left            =   1680
  415.       TabIndex        =   0
  416.       Text            =   "a.mp3"
  417.       Top             =   120
  418.       Width           =   6255
  419.    End
  420.    Begin VB.Timer Timer 
  421.       Enabled         =   0   'False
  422.       Interval        =   100
  423.       Left            =   7680
  424.       Top             =   120
  425.    End
  426.    Begin VB.CommandButton btStop 
  427.       Caption         =   "stop"
  428.       Height          =   315
  429.       Left            =   3360
  430.       TabIndex        =   4
  431.       Top             =   1920
  432.       Width           =   735
  433.    End
  434.    Begin VB.CommandButton btPause 
  435.       Caption         =   "pause"
  436.       Height          =   315
  437.       Left            =   2580
  438.       TabIndex        =   3
  439.       Top             =   1920
  440.       Width           =   735
  441.    End
  442.    Begin VB.CommandButton btPlay 
  443.       Caption         =   "play"
  444.       Height          =   315
  445.       Left            =   1800
  446.       TabIndex        =   2
  447.       Top             =   1920
  448.       Width           =   735
  449.    End
  450.    Begin VB.CommandButton btOpen 
  451.       Caption         =   "open"
  452.       Height          =   375
  453.       Left            =   120
  454.       TabIndex        =   1
  455.       Top             =   120
  456.       Width           =   615
  457.    End
  458.    Begin VB.Label Label48 
  459.       Caption         =   "Soft Volume"
  460.       BeginProperty Font 
  461.          Name            =   "
  462.          Size            =   8.25
  463.          Charset         =   128
  464.          Weight          =   400
  465.          Underline       =   0   'False
  466.          Italic          =   0   'False
  467.          Strikethrough   =   0   'False
  468.       EndProperty
  469.       Height          =   135
  470.       Left            =   2400
  471.       TabIndex        =   124
  472.       Top             =   3120
  473.       Width           =   915
  474.    End
  475.    Begin VB.Label Label45 
  476.       BackStyle       =   0  '
  477.       Caption         =   "Hard"
  478.       BeginProperty Font 
  479.          Name            =   "
  480.          Size            =   8.25
  481.          Charset         =   128
  482.          Weight          =   400
  483.          Underline       =   0   'False
  484.          Italic          =   0   'False
  485.          Strikethrough   =   0   'False
  486.       EndProperty
  487.       Height          =   195
  488.       Left            =   2580
  489.       TabIndex        =   122
  490.       Top             =   2820
  491.       Width           =   375
  492.    End
  493.    Begin VB.Label Label4 
  494.       Caption         =   "
  495. `300[%])
  496.       Height          =   195
  497.       Left            =   1860
  498.       TabIndex        =   121
  499.       Top             =   1740
  500.       Width           =   1455
  501.    End
  502.    Begin VB.Label Label26 
  503.       BackStyle       =   0  '
  504.       Caption         =   "
  505.       Height          =   255
  506.       Left            =   120
  507.       TabIndex        =   113
  508.       Top             =   1680
  509.       Width           =   735
  510.    End
  511.    Begin VB.Label Label22 
  512.       BackStyle       =   0  '
  513.       Caption         =   "
  514. Sleep"
  515.       Height          =   255
  516.       Left            =   120
  517.       TabIndex        =   104
  518.       Top             =   3420
  519.       Width           =   855
  520.    End
  521.    Begin VB.Label Label49 
  522.       BackStyle       =   0  '
  523.       Caption         =   "
  524.       Height          =   255
  525.       Left            =   4440
  526.       TabIndex        =   102
  527.       Top             =   1320
  528.       Width           =   2295
  529.    End
  530.    Begin VB.Label lbPlayTime2 
  531.       Alignment       =   1  '
  532.       BackStyle       =   0  '
  533.       Height          =   255
  534.       Left            =   6480
  535.       TabIndex        =   101
  536.       Top             =   1320
  537.       Width           =   615
  538.    End
  539.    Begin VB.Label lbTotalSec2 
  540.       BackStyle       =   0  '
  541.       Height          =   255
  542.       Left            =   7440
  543.       TabIndex        =   100
  544.       Top             =   1320
  545.       Width           =   615
  546.    End
  547.    Begin VB.Label Label43 
  548.       BackStyle       =   0  '
  549.       Caption         =   "/"
  550.       Height          =   255
  551.       Left            =   7200
  552.       TabIndex        =   99
  553.       Top             =   1320
  554.       Width           =   135
  555.    End
  556.    Begin VB.Label lbListILYC 
  557.       BackStyle       =   0  '
  558.       Height          =   255
  559.       Left            =   1080
  560.       TabIndex        =   97
  561.       Top             =   8880
  562.       Width           =   7095
  563.    End
  564.    Begin VB.Label Label36 
  565.       Alignment       =   1  '
  566.       BackStyle       =   0  '
  567.       Caption         =   "
  568.       Height          =   255
  569.       Left            =   120
  570.       TabIndex        =   96
  571.       Top             =   8880
  572.       Width           =   855
  573.    End
  574.    Begin VB.Label lbListICMS 
  575.       BackStyle       =   0  '
  576.       Height          =   255
  577.       Left            =   4800
  578.       TabIndex        =   95
  579.       Top             =   8640
  580.       Width           =   3375
  581.    End
  582.    Begin VB.Label Label47 
  583.       Alignment       =   1  '
  584.       BackStyle       =   0  '
  585.       Caption         =   "
  586.       Height          =   255
  587.       Left            =   3960
  588.       TabIndex        =   94
  589.       Top             =   8640
  590.       Width           =   855
  591.    End
  592.    Begin VB.Label lbListITCH 
  593.       BackStyle       =   0  '
  594.       Height          =   255
  595.       Left            =   1080
  596.       TabIndex        =   93
  597.       Top             =   8640
  598.       Width           =   2895
  599.    End
  600.    Begin VB.Label Label42 
  601.       Alignment       =   1  '
  602.       BackStyle       =   0  '
  603.       Caption         =   "
  604.       Height          =   255
  605.       Left            =   120
  606.       TabIndex        =   92
  607.       Top             =   8640
  608.       Width           =   855
  609.    End
  610.    Begin VB.Label Label39 
  611.       Caption         =   "RIFF 
  612.  LIST
  613.  (SI 
  614.       BeginProperty Font 
  615.          Name            =   "
  616.          Size            =   11.25
  617.          Charset         =   128
  618.          Weight          =   700
  619.          Underline       =   0   'False
  620.          Italic          =   -1  'True
  621.          Strikethrough   =   0   'False
  622.       EndProperty
  623.       Height          =   255
  624.       Left            =   1320
  625.       TabIndex        =   91
  626.       Top             =   6240
  627.       Width           =   5295
  628.    End
  629.    Begin VB.Label Label38 
  630.       Caption         =   "MPEG
  631.       BeginProperty Font 
  632.          Name            =   "
  633.          Size            =   11.25
  634.          Charset         =   128
  635.          Weight          =   700
  636.          Underline       =   0   'False
  637.          Italic          =   -1  'True
  638.          Strikethrough   =   0   'False
  639.       EndProperty
  640.       Height          =   255
  641.       Left            =   6720
  642.       TabIndex        =   90
  643.       Top             =   3420
  644.       Width           =   1335
  645.    End
  646.    Begin VB.Label Label37 
  647.       Caption         =   "
  648.       BeginProperty Font 
  649.          Name            =   "
  650.          Size            =   11.25
  651.          Charset         =   128
  652.          Weight          =   700
  653.          Underline       =   0   'False
  654.          Italic          =   -1  'True
  655.          Strikethrough   =   0   'False
  656.       EndProperty
  657.       Height          =   255
  658.       Left            =   1560
  659.       TabIndex        =   89
  660.       Top             =   4200
  661.       Width           =   1095
  662.    End
  663.    Begin VB.Label lbListIKEY 
  664.       BackStyle       =   0  '
  665.       Height          =   255
  666.       Left            =   4800
  667.       TabIndex        =   88
  668.       Top             =   8400
  669.       Width           =   3375
  670.    End
  671.    Begin VB.Label Label35 
  672.       Alignment       =   1  '
  673.       BackStyle       =   0  '
  674.       Caption         =   "
  675.       Height          =   255
  676.       Left            =   3960
  677.       TabIndex        =   87
  678.       Top             =   8400
  679.       Width           =   855
  680.    End
  681.    Begin VB.Label lbListISRC 
  682.       BackStyle       =   0  '
  683.       Height          =   255
  684.       Left            =   4800
  685.       TabIndex        =   86
  686.       Top             =   8160
  687.       Width           =   3375
  688.    End
  689.    Begin VB.Label Label46 
  690.       Alignment       =   1  '
  691.       BackStyle       =   0  '
  692.       Caption         =   "
  693.       Height          =   255
  694.       Left            =   3960
  695.       TabIndex        =   85
  696.       Top             =   8160
  697.       Width           =   855
  698.    End
  699.    Begin VB.Label lbListICOP 
  700.       BackStyle       =   0  '
  701.       Height          =   255
  702.       Left            =   1080
  703.       TabIndex        =   84
  704.       Top             =   7920
  705.       Width           =   7095
  706.    End
  707.    Begin VB.Label Label44 
  708.       Alignment       =   1  '
  709.       BackStyle       =   0  '
  710.       Caption         =   "
  711.       Height          =   255
  712.       Left            =   120
  713.       TabIndex        =   83
  714.       Top             =   7920
  715.       Width           =   855
  716.    End
  717.    Begin VB.Label lbListISFT 
  718.       BackStyle       =   0  '
  719.       Height          =   255
  720.       Left            =   1080
  721.       TabIndex        =   82
  722.       Top             =   8400
  723.       Width           =   2895
  724.    End
  725.    Begin VB.Label lbListIENG 
  726.       BackStyle       =   0  '
  727.       Height          =   255
  728.       Left            =   1080
  729.       TabIndex        =   81
  730.       Top             =   8160
  731.       Width           =   2895
  732.    End
  733.    Begin VB.Label Label41 
  734.       Alignment       =   1  '
  735.       BackStyle       =   0  '
  736.       Caption         =   "
  737.       Height          =   255
  738.       Left            =   120
  739.       TabIndex        =   80
  740.       Top             =   8400
  741.       Width           =   855
  742.    End
  743.    Begin VB.Label Label40 
  744.       Alignment       =   1  '
  745.       BackStyle       =   0  '
  746.       Caption         =   "
  747.       Height          =   255
  748.       Left            =   120
  749.       TabIndex        =   79
  750.       Top             =   8160
  751.       Width           =   855
  752.    End
  753.    Begin VB.Label lbListIGNR 
  754.       BackStyle       =   0  '
  755.       Height          =   255
  756.       Left            =   4800
  757.       TabIndex        =   78
  758.       Top             =   7680
  759.       Width           =   3375
  760.    End
  761.    Begin VB.Label lbListICRD 
  762.       BackStyle       =   0  '
  763.       Height          =   255
  764.       Left            =   1080
  765.       TabIndex        =   77
  766.       Top             =   7680
  767.       Width           =   2895
  768.    End
  769.    Begin VB.Label lbListICMT 
  770.       BackStyle       =   0  '
  771.       Height          =   255
  772.       Left            =   1080
  773.       TabIndex        =   76
  774.       Top             =   7440
  775.       Width           =   7095
  776.    End
  777.    Begin VB.Label lbListIPRD 
  778.       BackStyle       =   0  '
  779.       Height          =   255
  780.       Left            =   1080
  781.       TabIndex        =   75
  782.       Top             =   7200
  783.       Width           =   7095
  784.    End
  785.    Begin VB.Label lbListIART 
  786.       BackStyle       =   0  '
  787.       Height          =   255
  788.       Left            =   1080
  789.       TabIndex        =   74
  790.       Top             =   6960
  791.       Width           =   7095
  792.    End
  793.    Begin VB.Label lbListINAM 
  794.       BackStyle       =   0  '
  795.       Height          =   255
  796.       Left            =   1080
  797.       TabIndex        =   73
  798.       Top             =   6720
  799.       Width           =   7095
  800.    End
  801.    Begin VB.Label Label34 
  802.       Alignment       =   1  '
  803.       BackStyle       =   0  '
  804.       Caption         =   "
  805.       Height          =   255
  806.       Left            =   3960
  807.       TabIndex        =   72
  808.       Top             =   7680
  809.       Width           =   855
  810.    End
  811.    Begin VB.Label Label33 
  812.       Alignment       =   1  '
  813.       BackStyle       =   0  '
  814.       Caption         =   "
  815.       Height          =   255
  816.       Left            =   120
  817.       TabIndex        =   71
  818.       Top             =   7680
  819.       Width           =   855
  820.    End
  821.    Begin VB.Label Label32 
  822.       Alignment       =   1  '
  823.       BackStyle       =   0  '
  824.       Caption         =   "
  825.       Height          =   255
  826.       Left            =   120
  827.       TabIndex        =   70
  828.       Top             =   7440
  829.       Width           =   855
  830.    End
  831.    Begin VB.Label Label31 
  832.       Alignment       =   1  '
  833.       BackStyle       =   0  '
  834.       Caption         =   "
  835.       Height          =   255
  836.       Left            =   120
  837.       TabIndex        =   69
  838.       Top             =   7200
  839.       Width           =   855
  840.    End
  841.    Begin VB.Label Label30 
  842.       Alignment       =   1  '
  843.       BackStyle       =   0  '
  844.       Caption         =   "
  845.       Height          =   255
  846.       Left            =   120
  847.       TabIndex        =   68
  848.       Top             =   6960
  849.       Width           =   855
  850.    End
  851.    Begin VB.Label Label29 
  852.       Alignment       =   1  '
  853.       BackStyle       =   0  '
  854.       Caption         =   "
  855.       Height          =   255
  856.       Left            =   120
  857.       TabIndex        =   67
  858.       Top             =   6720
  859.       Width           =   855
  860.    End
  861.    Begin VB.Line Line7 
  862.       X1              =   0
  863.       X2              =   8160
  864.       Y1              =   6120
  865.       Y2              =   6120
  866.    End
  867.    Begin VB.Label Label28 
  868.       BackStyle       =   0  '
  869.       Caption         =   "
  870.       Height          =   255
  871.       Left            =   1800
  872.       TabIndex        =   63
  873.       Top             =   3420
  874.       Width           =   1455
  875.    End
  876.    Begin VB.Label lbGenreName 
  877.       BackStyle       =   0  '
  878.       Height          =   255
  879.       Left            =   3480
  880.       TabIndex        =   62
  881.       Top             =   3720
  882.       Width           =   1575
  883.    End
  884.    Begin VB.Line Line6 
  885.       X1              =   0
  886.       X2              =   1680
  887.       Y1              =   2340
  888.       Y2              =   2340
  889.    End
  890.    Begin VB.Line Line5 
  891.       X1              =   1680
  892.       X2              =   0
  893.       Y1              =   600
  894.       Y2              =   600
  895.    End
  896.    Begin VB.Line Line4 
  897.       X1              =   1680
  898.       X2              =   1680
  899.       Y1              =   4080
  900.       Y2              =   600
  901.    End
  902.    Begin VB.Label Label27 
  903.       BackStyle       =   0  '
  904.       Caption         =   "
  905. Sleep"
  906.       Height          =   255
  907.       Left            =   120
  908.       TabIndex        =   59
  909.       Top             =   3180
  910.       Width           =   855
  911.    End
  912.    Begin VB.Label Label25 
  913.       BackStyle       =   0  '
  914.       Caption         =   "VBMP3
  915.       Height          =   255
  916.       Left            =   120
  917.       TabIndex        =   58
  918.       Top             =   2460
  919.       Width           =   1455
  920.    End
  921.    Begin VB.Label Label24 
  922.       BackStyle       =   0  '
  923.       Caption         =   "
  924.       Height          =   255
  925.       Left            =   120
  926.       TabIndex        =   57
  927.       Top             =   2940
  928.       Width           =   855
  929.    End
  930.    Begin VB.Label Label20 
  931.       BackStyle       =   0  '
  932.       Caption         =   "
  933.       Height          =   255
  934.       Left            =   120
  935.       TabIndex        =   56
  936.       Top             =   2700
  937.       Width           =   855
  938.    End
  939.    Begin VB.Label Label18 
  940.       BackStyle       =   0  '
  941.       Caption         =   "
  942.       Height          =   255
  943.       Left            =   120
  944.       TabIndex        =   55
  945.       Top             =   720
  946.       Width           =   1455
  947.    End
  948.    Begin VB.Label Label16 
  949.       BackStyle       =   0  '
  950.       Caption         =   "
  951.       Height          =   255
  952.       Left            =   120
  953.       TabIndex        =   54
  954.       Top             =   1440
  955.       Width           =   735
  956.    End
  957.    Begin VB.Label Label13 
  958.       BackStyle       =   0  '
  959.       Caption         =   "
  960.       Height          =   255
  961.       Left            =   120
  962.       TabIndex        =   53
  963.       Top             =   1200
  964.       Width           =   735
  965.    End
  966.    Begin VB.Label Label12 
  967.       BackStyle       =   0  '
  968.       Caption         =   "
  969.       Height          =   255
  970.       Left            =   120
  971.       TabIndex        =   52
  972.       Top             =   960
  973.       Width           =   735
  974.    End
  975.    Begin VB.Line Line3 
  976.       X1              =   0
  977.       X2              =   5160
  978.       Y1              =   4080
  979.       Y2              =   4080
  980.    End
  981.    Begin VB.Label lbMpegInfo 
  982.       BackStyle       =   0  '
  983.       Height          =   2175
  984.       Left            =   5400
  985.       TabIndex        =   41
  986.       Top             =   3900
  987.       Width           =   2655
  988.    End
  989.    Begin VB.Line Line2 
  990.       X1              =   5160
  991.       X2              =   5160
  992.       Y1              =   6120
  993.       Y2              =   3300
  994.    End
  995.    Begin VB.Label Label23 
  996.       Alignment       =   1  '
  997.       BackStyle       =   0  '
  998.       Caption         =   "
  999.       Height          =   255
  1000.       Left            =   120
  1001.       TabIndex        =   39
  1002.       Top             =   5640
  1003.       Width           =   1095
  1004.    End
  1005.    Begin VB.Label lbTagGenre 
  1006.       BackStyle       =   0  '
  1007.       Height          =   255
  1008.       Left            =   1440
  1009.       TabIndex        =   38
  1010.       Top             =   5640
  1011.       Width           =   3495
  1012.    End
  1013.    Begin VB.Label Label21 
  1014.       Alignment       =   1  '
  1015.       BackStyle       =   0  '
  1016.       Caption         =   "
  1017.       Height          =   255
  1018.       Left            =   120
  1019.       TabIndex        =   37
  1020.       Top             =   5400
  1021.       Width           =   1095
  1022.    End
  1023.    Begin VB.Label lbTagYear 
  1024.       BackStyle       =   0  '
  1025.       Height          =   255
  1026.       Left            =   1440
  1027.       TabIndex        =   36
  1028.       Top             =   5400
  1029.       Width           =   3495
  1030.    End
  1031.    Begin VB.Label Label19 
  1032.       Alignment       =   1  '
  1033.       BackStyle       =   0  '
  1034.       Caption         =   "
  1035.       Height          =   255
  1036.       Left            =   120
  1037.       TabIndex        =   35
  1038.       Top             =   5880
  1039.       Width           =   1095
  1040.    End
  1041.    Begin VB.Label lbTagComment 
  1042.       BackStyle       =   0  '
  1043.       Height          =   255
  1044.       Left            =   1440
  1045.       TabIndex        =   34
  1046.       Top             =   5880
  1047.       Width           =   3495
  1048.    End
  1049.    Begin VB.Label Label17 
  1050.       Alignment       =   1  '
  1051.       BackStyle       =   0  '
  1052.       Caption         =   "
  1053.       Height          =   255
  1054.       Left            =   120
  1055.       TabIndex        =   33
  1056.       Top             =   5160
  1057.       Width           =   1095
  1058.    End
  1059.    Begin VB.Label lbTagAlbum 
  1060.       BackStyle       =   0  '
  1061.       Height          =   255
  1062.       Left            =   1440
  1063.       TabIndex        =   32
  1064.       Top             =   5160
  1065.       Width           =   3495
  1066.    End
  1067.    Begin VB.Label Label15 
  1068.       Alignment       =   1  '
  1069.       BackStyle       =   0  '
  1070.       Caption         =   "
  1071.       Height          =   255
  1072.       Left            =   120
  1073.       TabIndex        =   31
  1074.       Top             =   4680
  1075.       Width           =   1095
  1076.    End
  1077.    Begin VB.Label Label14 
  1078.       Alignment       =   1  '
  1079.       BackStyle       =   0  '
  1080.       Caption         =   "
  1081.       Height          =   255
  1082.       Left            =   120
  1083.       TabIndex        =   30
  1084.       Top             =   4920
  1085.       Width           =   1095
  1086.    End
  1087.    Begin VB.Label lbTagArtist 
  1088.       BackStyle       =   0  '
  1089.       Height          =   255
  1090.       Left            =   1440
  1091.       TabIndex        =   29
  1092.       Top             =   4680
  1093.       Width           =   3495
  1094.    End
  1095.    Begin VB.Label lbTagTrack 
  1096.       BackStyle       =   0  '
  1097.       Height          =   255
  1098.       Left            =   1440
  1099.       TabIndex        =   28
  1100.       Top             =   4920
  1101.       Width           =   3495
  1102.    End
  1103.    Begin VB.Line Line1 
  1104.       X1              =   1680
  1105.       X2              =   8160
  1106.       Y1              =   3300
  1107.       Y2              =   3300
  1108.    End
  1109.    Begin VB.Label Label10 
  1110.       BackStyle       =   0  '
  1111.       Caption         =   "/"
  1112.       Height          =   255
  1113.       Left            =   6240
  1114.       TabIndex        =   26
  1115.       Top             =   1080
  1116.       Width           =   135
  1117.    End
  1118.    Begin VB.Label Label11 
  1119.       Caption         =   "right"
  1120.       BeginProperty Font 
  1121.          Name            =   "
  1122.          Size            =   8.25
  1123.          Charset         =   128
  1124.          Weight          =   400
  1125.          Underline       =   0   'False
  1126.          Italic          =   0   'False
  1127.          Strikethrough   =   0   'False
  1128.       EndProperty
  1129.       Height          =   135
  1130.       Left            =   2940
  1131.       TabIndex        =   24
  1132.       Top             =   2940
  1133.       Width           =   375
  1134.    End
  1135.    Begin VB.Label Label3 
  1136.       Caption         =   "left"
  1137.       BeginProperty Font 
  1138.          Name            =   "
  1139.          Size            =   8.25
  1140.          Charset         =   128
  1141.          Weight          =   400
  1142.          Underline       =   0   'False
  1143.          Italic          =   0   'False
  1144.          Strikethrough   =   0   'False
  1145.       EndProperty
  1146.       Height          =   135
  1147.       Left            =   3000
  1148.       TabIndex        =   23
  1149.       Top             =   2760
  1150.       Width           =   255
  1151.    End
  1152.    Begin VB.Label Label1 
  1153.       Caption         =   "
  1154.       Height          =   195
  1155.       Left            =   1800
  1156.       TabIndex        =   22
  1157.       Top             =   2820
  1158.       Width           =   675
  1159.    End
  1160.    Begin VB.Label lbTotalSec 
  1161.       BackStyle       =   0  '
  1162.       Height          =   255
  1163.       Left            =   6360
  1164.       TabIndex        =   19
  1165.       Top             =   1080
  1166.       Width           =   735
  1167.    End
  1168.    Begin VB.Label lbTrackName 
  1169.       BackStyle       =   0  '
  1170.       Height          =   255
  1171.       Left            =   5520
  1172.       TabIndex        =   18
  1173.       Top             =   840
  1174.       Width           =   2655
  1175.    End
  1176.    Begin VB.Label lbArtistName 
  1177.       BackStyle       =   0  '
  1178.       Height          =   255
  1179.       Left            =   5520
  1180.       TabIndex        =   17
  1181.       Top             =   600
  1182.       Width           =   2655
  1183.    End
  1184.    Begin VB.Label lbSamplingRate 
  1185.       BackStyle       =   0  '
  1186.       Height          =   255
  1187.       Left            =   3120
  1188.       TabIndex        =   16
  1189.       Top             =   1080
  1190.       Width           =   1215
  1191.    End
  1192.    Begin VB.Label lbChannels 
  1193.       BackStyle       =   0  '
  1194.       Height          =   255
  1195.       Left            =   2760
  1196.       TabIndex        =   15
  1197.       Top             =   840
  1198.       Width           =   1575
  1199.    End
  1200.    Begin VB.Label lbBitRate 
  1201.       BackStyle       =   0  '
  1202.       Height          =   255
  1203.       Left            =   2760
  1204.       TabIndex        =   14
  1205.       Top             =   600
  1206.       Width           =   1575
  1207.    End
  1208.    Begin VB.Label Label9 
  1209.       BackStyle       =   0  '
  1210.       Caption         =   "
  1211.       Height          =   255
  1212.       Left            =   4440
  1213.       TabIndex        =   13
  1214.       Top             =   1080
  1215.       Width           =   975
  1216.    End
  1217.    Begin VB.Label Label8 
  1218.       BackStyle       =   0  '
  1219.       Caption         =   "
  1220.       Height          =   255
  1221.       Left            =   4440
  1222.       TabIndex        =   12
  1223.       Top             =   840
  1224.       Width           =   975
  1225.    End
  1226.    Begin VB.Label Label7 
  1227.       BackStyle       =   0  '
  1228.       Caption         =   "
  1229.       Height          =   255
  1230.       Left            =   4440
  1231.       TabIndex        =   11
  1232.       Top             =   600
  1233.       Width           =   1215
  1234.    End
  1235.    Begin VB.Label Label6 
  1236.       BackStyle       =   0  '
  1237.       Caption         =   "
  1238.       Height          =   255
  1239.       Left            =   1800
  1240.       TabIndex        =   10
  1241.       Top             =   1080
  1242.       Width           =   1335
  1243.    End
  1244.    Begin VB.Label Label5 
  1245.       BackStyle       =   0  '
  1246.       Caption         =   "
  1247.       Height          =   255
  1248.       Left            =   1800
  1249.       TabIndex        =   9
  1250.       Top             =   840
  1251.       Width           =   975
  1252.    End
  1253.    Begin VB.Label lbBitRateLabel 
  1254.       BackStyle       =   0  '
  1255.       Caption         =   "
  1256.       Height          =   255
  1257.       Left            =   1800
  1258.       TabIndex        =   8
  1259.       Top             =   600
  1260.       Width           =   975
  1261.    End
  1262.    Begin VB.Label lbPlayTime 
  1263.       Alignment       =   1  '
  1264.       BackStyle       =   0  '
  1265.       Height          =   255
  1266.       Left            =   5400
  1267.       TabIndex        =   7
  1268.       Top             =   1080
  1269.       Width           =   735
  1270.    End
  1271.    Begin VB.Label lbState 
  1272.       BackStyle       =   0  '
  1273.       Height          =   255
  1274.       Left            =   2880
  1275.       TabIndex        =   6
  1276.       Top             =   1320
  1277.       Width           =   1455
  1278.    End
  1279.    Begin VB.Label Label2 
  1280.       BackStyle       =   0  '
  1281.       Caption         =   "
  1282.       Height          =   255
  1283.       Left            =   1800
  1284.       TabIndex        =   5
  1285.       Top             =   1320
  1286.       Width           =   975
  1287.    End
  1288. Attribute VB_Name = "frmPLAY"
  1289. Attribute VB_GlobalNameSpace = False
  1290. Attribute VB_Creatable = False
  1291. Attribute VB_PredeclaredId = True
  1292. Attribute VB_Exposed = False
  1293. Option Explicit
  1294. Dim curSec As Long      '
  1295. Dim viewType As Long
  1296. Dim sfFlag As Integer   '
  1297. Dim window As Long
  1298. Private Sub btMpegInfo_Click()
  1299.     Dim MpegData As MPEG_INFO
  1300.     Dim sYes As String
  1301.     Dim sNo As String
  1302.     sYes = "Yes"
  1303.     sNo = "No"
  1304.     'mpeg 
  1305.     If vbmp3_getMpegInfo(MpegData) = False Then
  1306.         lbMpegInfo.Caption = "FileSize = " & vbCrLf & _
  1307.                              "TotalTime = " & vbCrLf & _
  1308.                              "Frames = " & vbCrLf & _
  1309.                              "MPEG-n" & _
  1310.                              " Layer n" & vbCrLf & _
  1311.                              "bitrate = " & vbCrLf & _
  1312.                              "SamplingRate = " & vbCrLf & _
  1313.                              "Mode = " & vbCrLf & _
  1314.                              "CRCs = " & vbCrLf & _
  1315.                              "Private = " & vbCrLf & _
  1316.                              "Original = " & vbCrLf & _
  1317.                              "Copyright = " & vbCrLf & _
  1318.                              "Emphasis = " & vbCrLf
  1319.         
  1320.         Exit Sub
  1321.     End If
  1322.     lbMpegInfo.Caption = "FileSize = " & MpegData.fileSize & " Byte" & vbCrLf & _
  1323.                          "TotalTime = " & MpegData.TotalSec & "sec" & vbCrLf & _
  1324.                          "Frames = " & MpegData.flames & vbCrLf & _
  1325.                          "MPEG-" & IIf(MpegData.version = 3, "2.5", MpegData.version) & _
  1326.                          " Layer " & MpegData.layer & vbCrLf & _
  1327.                          "bitrate = " & MpegData.bitrate & "kbit/sec" & vbCrLf & _
  1328.                          "SamplingRate = " & MpegData.samplingRate & "Hz" & vbCrLf
  1329.     Select Case MpegData.mode
  1330.     Case 0
  1331.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Stereo" & vbCrLf
  1332.     Case 1
  1333.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Joint stereo" & vbCrLf
  1334.     Case 2
  1335.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Dual channel" & vbCrLf
  1336.     Case 3
  1337.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Mono" & vbCrLf
  1338.     End Select
  1339.     If MpegData.crcDisable = 0 Then
  1340.        lbMpegInfo.Caption = lbMpegInfo.Caption & "CRCs = " & sYes & vbCrLf
  1341.     Else
  1342.        lbMpegInfo.Caption = lbMpegInfo.Caption & "CRCs = " & sNo & vbCrLf
  1343.     End If
  1344.     If MpegData.extension = 1 Then
  1345.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Private = " & sYes & vbCrLf
  1346.     Else
  1347.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Private = " & sNo & vbCrLf
  1348.     End If
  1349.     If MpegData.original = 1 Then
  1350.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Original = " & sYes & vbCrLf
  1351.     Else
  1352.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Original = " & sNo & vbCrLf
  1353.     End If
  1354.        
  1355.     If MpegData.copyright = 1 Then
  1356.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Copyright = " & sYes & vbCrLf
  1357.     Else
  1358.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Copyright = " & sNo & vbCrLf
  1359.     End If
  1360.     Select Case MpegData.emphasis
  1361.     Case 0
  1362.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = None" & vbCrLf
  1363.     Case 1
  1364.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = 50/15ms" & vbCrLf
  1365.     Case 2
  1366.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = Reserved" & vbCrLf
  1367.     Case 3
  1368.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = CCITT j.17" & vbCrLf
  1369.     End Select
  1370. End Sub
  1371. Private Sub btOpen_Click()
  1372.     Dim Data As InputInfo
  1373.     Dim result As Boolean
  1374.     Dim cnt As Integer
  1375.     Dim MpegData As MPEG_INFO
  1376.     Dim chkMp3Data As Boolean
  1377.     If Dir(txtFile.Text) = "" Then Exit Sub
  1378.     Call vbmp3_setFrameReadFlag(chkFrameRead.Value)
  1379.     '
  1380.     Call vbmp3_stop
  1381.     Timer.Enabled = False
  1382.     TimeView.Enabled = True
  1383.     '
  1384.     If vbmp3_open(Trim(txtFile.Text), Data) = False Then
  1385.         MsgBox "ErrNo : " & vbmp3_getLastErrorNo & " Open Error"
  1386.         Exit Sub
  1387.     End If
  1388.     openFlag = True
  1389.     frmLyrics.Show
  1390.     '
  1391.     For cnt = 0 To 4
  1392.         frmLyrics.lbLyrics(cnt).Caption = ""
  1393.     Next cnt
  1394.     frmLyrics.lbLyrics(0).ForeColor = &HFFFFFF
  1395.     frmLyrics.lbLyrics(1).ForeColor = &HFFFFFF
  1396.     '
  1397.     If chkLyrics3.Value = 0 Then
  1398.         If vbmp3_setLyricsFile(left(Trim(txtFile.Text), Len(Trim(txtFile.Text)) - 4) & ".txt") Then
  1399.         End If
  1400.     Else
  1401.         Call vbmp3_readLyrics3Data
  1402.     End If
  1403.     If vbmp3_checkTimeTag = 2 Then
  1404.         frmLyrics.lbKaraoke.Caption = "
  1405.     ElseIf vbmp3_checkTimeTag = 1 Then
  1406.         frmLyrics.lbKaraoke.Caption = "
  1407.     Else
  1408.         frmLyrics.lbKaraoke.Caption = "
  1409.     End If
  1410.     With Data
  1411.         '
  1412.         
  1413.         If NTrim(.szTrackName) = "WAVE_FORMAT_PCM" And NTrim(.szArtistName) = "WAVE_FORMAT_PCM" Then
  1414.             chkMp3Data = False
  1415.         Else
  1416.             chkMp3Data = True
  1417.         End If
  1418.         
  1419.         If chkMp3Data Then
  1420.             lbBitRateLabel = "
  1421.             lbBitRate = .bitrate & " kbit/s"
  1422.             If .bitrate = 0 Then lbBitRate = lbBitRate & " (VBR
  1423.         Else
  1424.             lbBitRateLabel = "
  1425.             lbBitRate = .bitrate & " bit/sample"
  1426.         End If
  1427.         
  1428.         If .channels = 2 Then
  1429.             lbChannels = "stereo"
  1430.         Else
  1431.             lbChannels = "mono"
  1432.         End If
  1433.         
  1434.         If chkMp3Data Then
  1435.             lbArtistName = NTrim(.szArtistName)
  1436.         Else
  1437.             lbArtistName = "Windows
  1438.         End If
  1439.         lbTrackName = NTrim(.szTrackName)
  1440.         lbSamplingRate = .samplingRate / 1000 & " kHz"
  1441.         If sfFlag = 0 Then
  1442.             lbTotalSec = Format(Int(.TotalSec / 60), "00") & ":" & Format((.TotalSec Mod 60), "00")
  1443.         ElseIf sfFlag = 1 Then
  1444.             Call vbmp3_getMpegInfo(MpegData)
  1445.             lbTotalSec = MpegData.flames
  1446.         Else
  1447.             lbTotalSec = vbmp3_getTotalSamples
  1448.         End If
  1449.         lbTotalSec2 = lbTotalSec
  1450.         lbPlayTime2 = "00:00"
  1451.         
  1452.         'seek
  1453.         scSeek.Max = .TotalSec
  1454.         If .TotalSec > 10 Then
  1455.             scSeek.LargeChange = .TotalSec / 10
  1456.         Else
  1457.             scSeek.LargeChange = 1
  1458.         End If
  1459.     End With
  1460.     Call getState           '
  1461.     frmLyrics.lbLyrics(0).Caption = lbTrackName.Caption
  1462.     frmLyrics.lbLyrics(1).Caption = "
  1463. F" & lbArtistName.Caption
  1464.     Debug.Print "
  1465. F" & vbmp3_getSilentFrames(Trim(txtFile.Text))
  1466. End Sub
  1467. Private Sub btPause_Click()
  1468.     If getState = 2 Then
  1469.         '
  1470.         Call vbmp3_restart  '
  1471.         Timer.Enabled = True
  1472.         TimeView.Enabled = True
  1473.     Else
  1474.         '
  1475.         Call vbmp3_pause    '
  1476.         Timer.Enabled = False
  1477.         TimeView.Enabled = False
  1478.     End If
  1479.     Call getState           '
  1480. End Sub
  1481. Private Sub btPlay_Click()
  1482.     Dim l, r As Long
  1483.     Dim flames As Long
  1484.         
  1485.     stopFlag = False
  1486.     If getState = 2 Then
  1487.         '
  1488.         Call vbmp3_restart          '
  1489.     Else
  1490.         pos = 0
  1491.         picWave.left = 0
  1492.         picWave.Cls
  1493.         lineCenter.X1 = -120
  1494.         lineCenter.X2 = 1560
  1495.         
  1496.         '
  1497.         l = scLVol.Value
  1498.         r = scRVol.Value
  1499.         
  1500.         Call vbmp3_play             '
  1501.         Call vbmp3_setVolume(l, r)  '
  1502.     End If
  1503.     Call getState                   '
  1504.     Timer.Enabled = True
  1505.     TimeView.Enabled = True
  1506. End Sub
  1507. Private Sub btStop_Click()
  1508.     Call vbmp3_stop         '
  1509.     Call vbmp3_encodeStop  '
  1510.     Timer.Enabled = True
  1511.     TimeView.Enabled = True
  1512.     stopFlag = True
  1513.     Call getState           '
  1514. End Sub
  1515. Private Sub btTagInfo_Click()
  1516.     Dim TagData As TAG_INFO
  1517.     '
  1518.     If vbmp3_getTagInfo(TagData) = False Then Exit Sub
  1519.     lbTagTrack.Caption = TagData.szTrackName
  1520.     lbTagArtist.Caption = TagData.szArtistName
  1521.     lbTagAlbum.Caption = TagData.szAlbumName
  1522.     lbTagYear.Caption = TagData.szYear
  1523.     lbTagComment.Caption = TagData.szComment
  1524.     lbTagGenre.Caption = TagData.szGenreName
  1525. End Sub
  1526. Private Sub chkFadeIn_Click()
  1527.     Call vbmp3_setFadeIn(chkFadeIn.Value)
  1528. End Sub
  1529. Private Sub chkFadeOut_Click()
  1530.     Call vbmp3_setFadeOut(chkFadeOut.Value)
  1531. End Sub
  1532. Private Sub cmd3x_Click()
  1533. End Sub
  1534. Private Sub chkQuickSeek_Click()
  1535.     '
  1536.     Call vbmp3_quickSeek(chkQuickSeek.Value)
  1537. End Sub
  1538. Private Sub cmdChgSecFlame_Click()
  1539.     Dim MpegData As MPEG_INFO
  1540.     Call vbmp3_getMpegInfo(MpegData)
  1541.     If sfFlag = 0 Then
  1542.         sfFlag = 1
  1543.         lbTotalSec = MpegData.flames
  1544.     ElseIf sfFlag = 1 Then
  1545.         sfFlag = 2
  1546.         lbTotalSec = vbmp3_getTotalSamples
  1547.     Else
  1548.         sfFlag = 0
  1549.         lbTotalSec = Format(Int(MpegData.TotalSec / 60), "00") & ":" & Format((MpegData.TotalSec Mod 60), "00")
  1550.     End If
  1551.     Call getState           '
  1552. End Sub
  1553. Private Sub cmdChgWindow_Click()
  1554.     If window > 3 Then
  1555.         window = 0
  1556.     Else
  1557.         window = window + 1
  1558.     End If
  1559.     Call vbmp3_setFftWindow(window)
  1560. End Sub
  1561. Private Sub cmdDecGet_Click()
  1562.     Dim opt As DEC_OPTION
  1563.     Call vbmp3_getDecodeOption(opt)
  1564.     txtSam.Text = opt.reduction
  1565.     txtChan.Text = opt.convert
  1566.     txtFre.Text = opt.freqLimit
  1567.     txtPitch.Text = vbmp3_getPitch
  1568. End Sub
  1569. Private Sub cmdDecodeWave_Click()
  1570.     Dim l, r As Long
  1571.     If Dir(txtFile.Text) = "" Then Exit Sub
  1572.         
  1573.     If getState = 2 Then
  1574.         '
  1575.         Call vbmp3_restart          '
  1576.     Else
  1577.         '
  1578.         If MsgBox("
  1579. ", vbQuestion + vbYesNo, "
  1580. F") = vbYes Then
  1581.             Call vbmp3_playDecodeWave(Trim(txtFile.Text) & ".wav")  '
  1582.         Else
  1583.             Call vbmp3_decodeWave(Trim(txtFile.Text) & ".wav")  '
  1584.         End If
  1585.     End If
  1586.     Call getState                   '
  1587.     Timer.Enabled = True
  1588.     TimeView.Enabled = True
  1589. End Sub
  1590. Private Sub cmdEncode_Click()
  1591.     Dim pWaveForm As WAVE_FORM
  1592.     Dim outFile As String
  1593.     outFile = left(Trim(txtFile.Text), Len(Trim(txtFile.Text)) - 4)
  1594.     outFile = outFile + ".mp3"
  1595.     If vbmp3_encodeOpen(Trim(txtFile.Text), pWaveForm) Then
  1596.         lbBitRate = pWaveForm.bitsPerSample & "bit(bit/sample)"
  1597.         If pWaveForm.channels = 2 Then
  1598.             lbChannels = "stereo"
  1599.         Else
  1600.             lbChannels = "mono"
  1601.         End If
  1602.         lbSamplingRate = pWaveForm.samplingRate / 1000 & "kHz"
  1603.         lbArtistName = pWaveForm.dataSize
  1604.         lbTrackName = 0
  1605.         Call vbmp3_encodeStart(outFile)
  1606.         Timer.Enabled = True
  1607.     End If
  1608. End Sub
  1609. Private Sub cmdFadeOutNow_Click()
  1610.     Call vbmp3_fadeOut
  1611. End Sub
  1612. Private Sub cmdGE_Click()
  1613.     frmGE.Show
  1614. End Sub
  1615. Private Sub cmdGenreGet_Click()
  1616.     Dim TagData As TAG_INFO
  1617.     If IsNumeric(txtGenreNo.Text) = False Then Exit Sub
  1618.     TagData.genre = Val(txtGenreNo.Text)
  1619.     Call vbmp3_getGenre(TagData)
  1620.     lbGenreName.Caption = NTrim(TagData.szGenreName)
  1621. End Sub
  1622. Private Sub cmdGetList_Click()
  1623.     Dim ListData As LIST_INFO
  1624.     Dim listString As String
  1625.     If vbmp3_getListInfo(ListData) = False Then Exit Sub
  1626.     lbListINAM.Caption = NTrim(ListData.INAM)
  1627.     lbListIART.Caption = NTrim(ListData.IART)
  1628.     lbListIPRD.Caption = NTrim(ListData.IPRD)
  1629.     lbListICMT.Caption = NTrim(ListData.ICMT)
  1630.     lbListICRD.Caption = NTrim(ListData.ICRD)
  1631.     lbListIGNR.Caption = NTrim(ListData.IGNR)
  1632.     lbListICOP.Caption = NTrim(ListData.ICOP)
  1633.     lbListIENG.Caption = NTrim(ListData.IENG)
  1634.     lbListISRC.Caption = NTrim(ListData.ISRC)
  1635.     lbListISFT.Caption = NTrim(ListData.ISFT)
  1636.     lbListIKEY.Caption = NTrim(ListData.IKEY)
  1637.     lbListITCH.Caption = NTrim(ListData.ITCH)
  1638.     lbListILYC.Caption = NTrim(ListData.ILYC)
  1639.     lbListICMS.Caption = NTrim(ListData.ICMS)
  1640. End Sub
  1641. Private Sub cmdGetVol_Click()
  1642.     Dim l As Long
  1643.     Dim r As Long
  1644.     Call vbmp3_getVolume(l, r)
  1645. End Sub
  1646. Private Sub cmdNomal_Click()
  1647.     Call vbmp3_setStepPitch(1)
  1648.     Call cmdVbmp3Get_Click
  1649. End Sub
  1650. Private Sub cmdOptSam_Click()
  1651.     Dim opt As DEC_OPTION
  1652.     Dim pitch As Long
  1653.     opt.reduction = Val(txtSam.Text)
  1654.     opt.convert = Val(txtChan.Text)
  1655.     opt.freqLimit = Val(txtFre.Text)
  1656.     pitch = Val(txtPitch.Text)
  1657.     If vbmp3_setDecodeOption(opt) = False Then
  1658.         MsgBox "error"
  1659.     End If
  1660.     If vbmp3_setPitch(pitch) = False Then
  1661.         MsgBox "error"
  1662.     End If
  1663. End Sub
  1664. Private Sub cmdSiEdit_Click()
  1665.     frmSiInput.Show
  1666. End Sub
  1667. Private Sub cmdTagEdit_Click()
  1668.     frmTagInput.Show
  1669. End Sub
  1670. Private Sub cmdVbmp3Get_Click()
  1671.     Dim opt As VBMP3_OPTION
  1672.     Call vbmp3_getVbmp3Option(opt)
  1673.     txtInFlame.Text = opt.inputBlock
  1674.     txtOutFlame.Text = opt.outputBlock
  1675.     txtInSleep.Text = opt.inputSleep
  1676.     txtOutSleep.Text = opt.outputSleep
  1677. End Sub
  1678. Private Sub cmdVbmp3Opt_Click()
  1679.     Dim opt As VBMP3_OPTION
  1680.     opt.inputBlock = Val(txtInFlame.Text)
  1681.     opt.outputBlock = Val(txtOutFlame.Text)
  1682.     opt.inputSleep = Val(txtInSleep.Text)
  1683.     opt.outputSleep = Val(txtOutSleep.Text)
  1684.     If vbmp3_setVbmp3Option(opt) = False Then
  1685.         MsgBox "error"
  1686.     End If
  1687. End Sub
  1688. Private Sub cmdx2_Click()
  1689.     Call vbmp3_setStepPitch(2)
  1690.     Call cmdVbmp3Get_Click
  1691. End Sub
  1692. Private Sub cmdx3_Click()
  1693.     Call vbmp3_setStepPitch(3)
  1694.     Call cmdVbmp3Get_Click
  1695. End Sub
  1696. Private Sub Command1_Click()
  1697.     frmLyrics3Input.Show
  1698. End Sub
  1699. Private Sub Command2_Click()
  1700.     Dim a(1000) As LYRICS_DATA
  1701.     MsgBox "aa"
  1702. End Sub
  1703. Private Sub Form_Load()
  1704.     Dim VerNo As Long
  1705.     Dim l As Long
  1706.     Dim r As Long
  1707.     Dim chkDev As Long
  1708.     Dim result As Boolean
  1709.     Call vbmp3_init         'VBMP3.DLL 
  1710.     Call getState           '
  1711.     '
  1712.     chkDev = vbmp3_getWaveOutSupport
  1713.     If chkDev = 0 Then
  1714.         scLVol.Enabled = False
  1715.         scRVol.Enabled = False
  1716.     End If
  1717.     Call vbmp3_getVolume(l, r)    '
  1718.     scLVol.Value = l
  1719.     scRVol.Value = r
  1720.     sfFlag = 0
  1721.     stopFlag = True         '
  1722.     openFlag = False        '
  1723.     viewType = 1            'WAVE
  1724.     VerNo = vbmp3_getVersion()  'Version No 
  1725.     btMpegInfo_Click
  1726.     Call vbmp3_setEqualizer(ByVal 0&)     '
  1727.     '
  1728.     nonProc = False
  1729.     If MsgBox("
  1730. H(VB5
  1731. )", vbQuestion + vbYesNo, "
  1732. F") = vbYes Then
  1733.         Call vbmp3_callback(AddressOf vbmp3_Proc)
  1734.         nonProc = True  '
  1735.     End If
  1736.     TimeView.Interval = 0
  1737.     If MsgBox("WAVE
  1738. H", vbQuestion + vbYesNo, "
  1739. F") = vbYes Then
  1740.         TimeView.Interval = 100  '
  1741.     End If
  1742.         
  1743.     '
  1744.     Call vbmp3_setKaraokeUse(1)
  1745.     '
  1746.     Call vbmp3_useAtMarkTag(1)
  1747.     '
  1748.     Call vbmp3_setLyricsNextAdjustTime(1000)
  1749.     '
  1750.     Call vbmp3_quickSeek(chkQuickSeek.Value)
  1751.     '
  1752. '    result = vbmp3_startCallBackTimer(AddressOf vbmp3_TimerProc, 50, 0, 0)
  1753. '    If result = False Then
  1754. '        MsgBox "
  1755. '    End If
  1756.     Call cmdVbmp3Get_Click
  1757.     frmLyrics.Show
  1758.     Me.Caption = "Sample MP3 Player [VBMP3 Ver." & VerNo / 100 & "]"
  1759. End Sub
  1760. Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
  1761.     If Data.GetFormat(vbCFFiles) Then
  1762.         txtFile.Text = Data.Files(1)
  1763.     End If
  1764. End Sub
  1765. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  1766. '    nonProc = False
  1767. '    Unload frmLyrics
  1768. '    Call vbmp3_stopCallback
  1769. '    MsgBox "1"
  1770. '    Call vbmp3_free         'VBMP3.DLL 
  1771. '    MsgBox "2"
  1772. End Sub
  1773. Private Sub Form_Unload(Cancel As Integer)
  1774.     nonProc = False
  1775.     Unload frmLyrics
  1776.     Call vbmp3_stop
  1777.     Call vbmp3_stopCallback
  1778.     Call vbmp3_free         'VBMP3.DLL 
  1779.     End
  1780. End Sub
  1781. Private Sub btFileInfo_Click()
  1782.     Dim TagData As TAG_INFO
  1783.     Dim MpegData As MPEG_INFO
  1784.     Dim ListData As LIST_INFO
  1785.     Dim sYes As String
  1786.     Dim sNo As String
  1787.     sYes = "Yes"
  1788.     sNo = "No"
  1789.     If vbmp3_getFileInfo2(Trim(txtFile.Text), TagData, MpegData, ListData) = False Then
  1790.         lbTagTrack.Caption = ""
  1791.         lbTagArtist.Caption = ""
  1792.         lbTagAlbum.Caption = ""
  1793.         lbTagYear.Caption = ""
  1794.         lbTagComment.Caption = ""
  1795.         lbTagGenre.Caption = ""
  1796.         lbListINAM.Caption = ""
  1797.         lbListIART.Caption = ""
  1798.         lbListIPRD.Caption = ""
  1799.         lbListICMT.Caption = ""
  1800.         lbListICRD.Caption = ""
  1801.         lbListIGNR.Caption = ""
  1802.         lbListICOP.Caption = ""
  1803.         lbListIENG.Caption = ""
  1804.         lbListISRC.Caption = ""
  1805.         lbListISFT.Caption = ""
  1806.         lbListIKEY.Caption = ""
  1807.         lbListITCH.Caption = ""
  1808.         lbListILYC.Caption = ""
  1809.         lbListICMS.Caption = ""
  1810.         lbMpegInfo.Caption = "FileSize = " & vbCrLf & _
  1811.                          "TotalTime = " & vbCrLf & _
  1812.                          "Frames = " & vbCrLf & _
  1813.                          "MPEG-n" & _
  1814.                          " Layer n" & vbCrLf & _
  1815.                          "bitrate = " & vbCrLf & _
  1816.                          "SamplingRate = " & vbCrLf & _
  1817.                          "Mode = " & vbCrLf & _
  1818.                          "CRCs = " & vbCrLf & _
  1819.                          "Private = " & vbCrLf & _
  1820.                          "Original = " & vbCrLf & _
  1821.                          "Copyright = " & vbCrLf & _
  1822.                          "Emphasis = " & vbCrLf
  1823.         Exit Sub
  1824.     End If
  1825.     lbTagTrack.Caption = TagData.szTrackName
  1826.     lbTagArtist.Caption = TagData.szArtistName
  1827.     lbTagAlbum.Caption = TagData.szAlbumName
  1828.     lbTagYear.Caption = TagData.szYear
  1829.     lbTagComment.Caption = TagData.szComment
  1830.     lbTagGenre.Caption = TagData.szGenreName
  1831.     lbListINAM.Caption = NTrim(ListData.INAM)
  1832.     lbListIART.Caption = NTrim(ListData.IART)
  1833.     lbListIPRD.Caption = NTrim(ListData.IPRD)
  1834.     lbListICMT.Caption = NTrim(ListData.ICMT)
  1835.     lbListICRD.Caption = NTrim(ListData.ICRD)
  1836.     lbListIGNR.Caption = NTrim(ListData.IGNR)
  1837.     lbListICOP.Caption = NTrim(ListData.ICOP)
  1838.     lbListIENG.Caption = NTrim(ListData.IENG)
  1839.     lbListISRC.Caption = NTrim(ListData.ISRC)
  1840.     lbListISFT.Caption = NTrim(ListData.ISFT)
  1841.     lbListIKEY.Caption = NTrim(ListData.IKEY)
  1842.     lbListITCH.Caption = NTrim(ListData.ITCH)
  1843.     lbListILYC.Caption = NTrim(ListData.ILYC)
  1844.     lbListICMS.Caption = NTrim(ListData.ICMS)
  1845.     lbMpegInfo.Caption = "FileSize = " & MpegData.fileSize & " Byte" & vbCrLf & _
  1846.                          "TotalTime = " & MpegData.TotalSec & "sec" & vbCrLf & _
  1847.                          "Frames = " & MpegData.flames & vbCrLf & _
  1848.                          "MPEG-" & IIf(MpegData.version = 3, "2.5", MpegData.version) & _
  1849.                          " Layer " & MpegData.layer & vbCrLf & _
  1850.                          "bitrate = " & MpegData.bitrate & "kbit/sec" & vbCrLf & _
  1851.                          "SamplingRate = " & MpegData.samplingRate & "Hz" & vbCrLf
  1852.     Select Case MpegData.mode
  1853.     Case 0
  1854.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Stereo" & vbCrLf
  1855.     Case 1
  1856.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Joint stereo" & vbCrLf
  1857.     Case 2
  1858.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Dual channel" & vbCrLf
  1859.     Case 3
  1860.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Mode = Mono" & vbCrLf
  1861.     End Select
  1862.     If MpegData.crcDisable = 0 Then
  1863.        lbMpegInfo.Caption = lbMpegInfo.Caption & "CRCs = " & sYes & vbCrLf
  1864.     Else
  1865.        lbMpegInfo.Caption = lbMpegInfo.Caption & "CRCs = " & sNo & vbCrLf
  1866.     End If
  1867.     If MpegData.extension = 1 Then
  1868.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Private = " & sYes & vbCrLf
  1869.     Else
  1870.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Private = " & sNo & vbCrLf
  1871.     End If
  1872.     If MpegData.original = 1 Then
  1873.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Original = " & sYes & vbCrLf
  1874.     Else
  1875.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Original = " & sNo & vbCrLf
  1876.     End If
  1877.        
  1878.     If MpegData.copyright = 1 Then
  1879.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Copyright = " & sYes & vbCrLf
  1880.     Else
  1881.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Copyright = " & sNo & vbCrLf
  1882.     End If
  1883.     Select Case MpegData.emphasis
  1884.     Case 0
  1885.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = None" & vbCrLf
  1886.     Case 1
  1887.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = 50/15ms" & vbCrLf
  1888.     Case 2
  1889.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = Reserved" & vbCrLf
  1890.     Case 3
  1891.        lbMpegInfo.Caption = lbMpegInfo.Caption & "Emphasis = CCITT j.17" & vbCrLf
  1892.     End Select
  1893. End Sub
  1894. Private Sub hscPitch_Change()
  1895.     Call vbmp3_setPitch(hscPitch.Value)
  1896.     txtPitch.Text = vbmp3_getPitch
  1897. End Sub
  1898. Private Sub hscPitch_Scroll()
  1899.     Call vbmp3_setPitch(hscPitch.Value)
  1900.     txtPitch.Text = vbmp3_getPitch
  1901. End Sub
  1902. Private Sub picWave_Click()
  1903.     If viewType = 1 Then
  1904.         viewType = 2
  1905.         picWave.Cls
  1906.         lineCenter.Visible = False
  1907.         picWave.BackColor = vbBlack
  1908.     ElseIf viewType = 2 Then
  1909.         viewType = 3
  1910.         picWave.Cls
  1911.     ElseIf viewType = 3 Then
  1912.         viewType = 4
  1913.         picWave.Cls
  1914.     ElseIf viewType = 4 Then
  1915.         viewType = 5
  1916.         picWave.Cls
  1917.     ElseIf viewType = 5 Then
  1918.         viewType = 6
  1919.         picWave.Cls
  1920.     ElseIf viewType = 6 Then
  1921.         viewType = 1
  1922.         picWave.Cls
  1923.         lineCenter.Visible = True
  1924.         picWave.BackColor = vbWhite
  1925.     End If
  1926. End Sub
  1927. Private Sub scLVol_Change()
  1928.     Dim l, r As Long
  1929.     l = scLVol.Value
  1930.     r = scRVol.Value
  1931.     Call vbmp3_setVolume(l, r)  '
  1932.     Call vbmp3_getVolume(l, r)  '
  1933. End Sub
  1934. Private Sub scRVol_Change()
  1935.     Dim l, r As Long
  1936.     l = scLVol.Value
  1937.     r = scRVol.Value
  1938.     Call vbmp3_setVolume(l, r)  '
  1939. End Sub
  1940. Private Sub scSeek_Change()
  1941.     Dim sec As Long
  1942.     Dim state As Long
  1943.     If scSeek.LargeChange <= 1 Then Exit Sub
  1944.     If scSeek.Value = 0 And stopFlag = True Then Exit Sub
  1945.     sec = scSeek.Value
  1946.     If (sec >= (curSec + scSeek.LargeChange) Or sec < curSec) Or stopFlag = True Then
  1947.         Call vbmp3_seek(sec)  '
  1948.         state = vbmp3_getState(sec)
  1949.         If state = 0 Then Exit Sub
  1950.     End If
  1951.     stopFlag = False
  1952.     Call getState                   '
  1953.     Timer.Enabled = True
  1954.     TimeView.Enabled = True
  1955. End Sub
  1956. Private Sub scSeek_Scroll()
  1957.     Dim sec As Long
  1958.     sec = scSeek.Value
  1959.     Call vbmp3_seek(sec)    'seek
  1960. End Sub
  1961. Private Sub scSoftVol_Change()
  1962.     Call vbmp3_setSoftVolume(scSoftVol.Value, scSoftVol.Value)
  1963. End Sub
  1964. Private Sub scSoftVol_Scroll()
  1965.     Call vbmp3_setSoftVolume(scSoftVol.Value, scSoftVol.Value)
  1966. End Sub
  1967. Private Sub Timer_Timer()
  1968.     Dim state As Long
  1969.     Dim sec As Long
  1970.     Call getState           '
  1971.     Load frmLyrics
  1972.     Call setLyrics
  1973.     '
  1974.     state = vbmp3_getState(sec)
  1975.     '
  1976.     If stopFlag = False And openFlag = True And state = 0 Then
  1977.         Call btPlay_Click
  1978.     End If
  1979. End Sub
  1980. Function getState() As Long
  1981.     Dim state As Long
  1982.     Dim encState As Long
  1983.     Dim sec As Long
  1984.     Dim readSize As Long
  1985.     Dim encodeSize As Long
  1986.     Dim br As Long
  1987.     '
  1988.     state = vbmp3_getState(sec)
  1989.     encState = vbmp3_getEncodeState(readSize, encodeSize)
  1990.     If encState = 1 Then
  1991.         lbState = "
  1992.         lbTrackName = readSize & "(" & encodeSize & ")"
  1993.     Else
  1994.         
  1995.         '
  1996.         If state = 0 Then
  1997.             lbState = "
  1998.             Timer.Enabled = False
  1999.             TimeView.Enabled = True
  2000.         ElseIf state = 1 Then
  2001.             lbState = "
  2002.             br = vbmp3_getPlayBitRate
  2003.             lbBitRate.Caption = br & " kbit/s"
  2004.         Else
  2005.             lbState = "
  2006.         End If
  2007.     End If
  2008.     '
  2009.     If lbTotalSec <> "" Then
  2010.         If sfFlag = 0 Then
  2011.             lbPlayTime.Caption = Format(Int(sec / 60), "00") & ":" & Format((sec Mod 60), "00")
  2012.         ElseIf sfFlag = 1 Then
  2013.             lbPlayTime.Caption = vbmp3_getPlayFlames
  2014.         Else
  2015.             lbPlayTime.Caption = vbmp3_getPlaySamples
  2016.         End If
  2017.     End If
  2018.     curSec = sec
  2019.     scSeek.Value = sec
  2020.     getState = state
  2021. End Function
  2022. Function setLyrics()
  2023.     Dim lyricsInfo As LYRICS_INFO2
  2024.     Dim waPlayMs As Long
  2025.     Dim waTotalSec As Long
  2026.     Dim lyTextSize As Long
  2027.     Dim lyBefTextSize As Long
  2028.     Dim lyCurTextSize As Long
  2029.     Dim point As Double
  2030.     Dim lyPoint As Long
  2031.     Dim lyLine As Long
  2032.     Dim lyCnt As Long
  2033.     Dim lyText As String
  2034.     Dim vPicPoint As Long
  2035.     Dim vHeight As Long
  2036.     Dim vCurTop As Long
  2037.     Dim lyLen As Long
  2038.         
  2039.     waPlayMs = vbmp3_getWinampPlayMs
  2040.     waTotalSec = vbmp3_getWinampTotalSec
  2041.     Call vbmp3_getLyrics2(lyricsInfo)
  2042.     frmLyrics.lbLyrics(0).Caption = lyricsInfo.LyricsPrev2
  2043.     frmLyrics.lbLyrics(1).Caption = lyricsInfo.LyricsPrev1
  2044.     frmLyrics.lbLyrics(2).Caption = lyricsInfo.LyricsCurrentAll
  2045.     frmLyrics.lbLyrics(3).Caption = lyricsInfo.LyricsNext1
  2046.     frmLyrics.lbLyrics(4).Caption = lyricsInfo.LyricsNext2
  2047.     '
  2048.     If (lyricsInfo.length <> 0) Then
  2049.         frmLyrics.lbWork1.Caption = Trim(NTrim(lyricsInfo.LyricsCurrentLyrics))
  2050.         frmLyrics.lbWork2.Caption = Trim(NTrim(lyricsInfo.LyricsCurrentBegin))
  2051.         lyTextSize = frmLyrics.lbWork1.Width
  2052.         lyBefTextSize = frmLyrics.lbWork2.Width
  2053.         point = (waPlayMs - lyricsInfo.sec) / lyricsInfo.length
  2054.         lyCurTextSize = (lyTextSize - lyBefTextSize) * point
  2055.         lyCurTextSize = lyBefTextSize + lyCurTextSize
  2056.     End If
  2057.     If frmLyrics.chkViewType.Value = 1 Then
  2058.         frmLyrics.lbLyrics(6).Visible = True
  2059.         If frmLyrics.lbLyrics(5).Width <> 6735 Then frmLyrics.lbLyrics(5).Width = 6735
  2060.         frmLyrics.lbLyrics(5).Caption = lyricsInfo.LyricsCurrentLyrics
  2061.         frmLyrics.lbLyrics(6).Caption = lyricsInfo.LyricsCurrentBegin
  2062.     Else
  2063.         frmLyrics.lbLyrics(6).Visible = False
  2064.         frmLyrics.lbLyrics(5).Caption = lyricsInfo.LyricsCurrentAll
  2065.         '
  2066.         If (lyricsInfo.length <> 0) Then
  2067.             If Len(frmLyrics.lbWork1.Caption) = 0 Then
  2068.                 frmLyrics.lbLyrics(5).Width = 0
  2069.             ElseIf lyCurTextSize >= 0 Then
  2070.                 frmLyrics.lbLyrics(5).Width = lyCurTextSize
  2071.             End If
  2072.         End If
  2073.     End If
  2074.     '
  2075.     lyPoint = vbmp3_getLyricsPoint
  2076.     If lyPoint > 0 Then
  2077.         '
  2078.         lyLine = lyricsData2(lyPoint).lineno
  2079.         If (lyPoint + 1 < maxLyNo) Then
  2080.             lyLen = lyricsData2(lyPoint + 1).sec - lyricsData2(lyPoint).sec
  2081.         Else
  2082.             lyLen = 0
  2083.         End If
  2084.         lyText = ""
  2085.         For lyCnt = 0 To 999
  2086.             If lyricsData2(lyCnt).point = 1 And lyricsData2(lyCnt).lineno > 0 Then lyText = lyText & vbCrLf
  2087.             If lyricsData2(lyCnt).lineno = lyLine Then
  2088.                 lyText = lyText & lyricsData2(lyCnt).lyrics
  2089.             ElseIf lyricsData2(lyCnt).lineno > lyLine Then
  2090.                 Exit For
  2091.             End If
  2092.         Next lyCnt
  2093.         
  2094.         '
  2095.         If frmLyrics2.lbCurLyrics.Caption <> lyText Then
  2096.             frmLyrics2.lbCurLyrics.Caption = lyText
  2097.         End If
  2098.         If (lyLen <> 0) Then
  2099.             If Len(frmLyrics.lbWork1.Caption) = 0 Then
  2100.                 lyCurTextSize = 0
  2101.             End If
  2102.             If frmLyrics2.lbCurLyrics.Width <> lyCurTextSize Then
  2103.                 frmLyrics2.lbCurLyrics.Width = lyCurTextSize
  2104.             End If
  2105.         End If
  2106.         '
  2107.         vHeight = frmLyrics2.lbLyrics.Height / (maxLineNo + 1)
  2108.         vPicPoint = frmLyrics2.picLyricsView.Height / 2 - vHeight / 2
  2109.         If vPicPoint < 0 Then vPicPoint = 0
  2110.         vCurTop = lyLine * vHeight - vPicPoint
  2111.         If frmLyrics2.lbLyrics.Top <> -vCurTop Then
  2112.             frmLyrics2.lbLyrics.Top = -vCurTop
  2113.             frmLyrics2.lbCurLyrics.Top = -vCurTop
  2114.         End If
  2115.     End If
  2116.     frmLyrics.lbLyrics(0).ForeColor = &H808080
  2117.     frmLyrics.lbLyrics(1).ForeColor = &H808080
  2118.     frmLyrics.Caption = "
  2119. (" & Format(Int(waPlayMs / 60000), "00") & ":" & _
  2120.                                   Format((waPlayMs / 1000 Mod 60), "00") & ":" & _
  2121.                                   Format((waPlayMs Mod 1000), "000") & " / " & _
  2122.                                   Format(Int(waTotalSec / 60), "00") & ":" & Format((waTotalSec Mod 60), "00") & " ) "
  2123. End Function
  2124. Private Sub TimeView_Timer()
  2125.     Dim m_specTblL(255) As Long
  2126.     Dim m_specTblR(255) As Long
  2127.     Dim m_waveTblL(255) As Long
  2128.     Dim m_waveTblR(255) As Long
  2129.     Dim i As Long
  2130.     Dim j As Long
  2131.     Dim y As Long
  2132.     Dim XX As Long
  2133.     Dim YY As Long
  2134.     Dim v As Long
  2135.     Dim curData As Long
  2136.     Dim waveData As WAVE_DATA
  2137.     Dim rr As Integer
  2138.     Dim gg As Integer
  2139.     Dim bb As Integer
  2140.     Dim lv As Long
  2141.     Dim rv As Long
  2142.     '---- 
  2143.  ------
  2144.     If viewType = 1 Then
  2145.         Call vbmp3_getWave(m_waveTblL(0), m_waveTblR(0))
  2146.         picWave.Cls
  2147.         
  2148.         '
  2149.         m_waveTblL(0) = (m_waveTblL(0) + m_waveTblR(0)) / 2 + 100
  2150.         XX = 0
  2151.         YY = ((picWave.Height / 200) * m_waveTblL(0)) / 15
  2152.         Call MoveToEx(picWave.hdc, XX, YY, 0&)
  2153.         Call LineTo(picWave.hdc, XX, YY)
  2154.         lv = Abs(m_waveTblL(0))
  2155.         rv = Abs(m_waveTblR(0))
  2156.         
  2157.         For i = 1 To 127
  2158.             j = i * 2
  2159.             lv = lv + Abs(m_waveTblL(j))
  2160.             rv = rv + Abs(m_waveTblR(j))
  2161.             'If lv < Abs(m_waveTblL(j)) Then lv = Abs(m_waveTblL(j))
  2162.             'If rv < Abs(m_waveTblR(j)) Then rv = Abs(m_waveTblR(j))
  2163.             m_waveTblL(j) = (m_waveTblL(j) + m_waveTblR(j)) / 2 + 100
  2164.             '
  2165.             XX = ((picWaveFrm.ScaleWidth / 256) * j) / 15
  2166.             YY = ((picWave.Height / 200) * m_waveTblL(j)) / 15
  2167.             Call LineTo(picWave.hdc, XX, YY)
  2168.             '
  2169.             'Call SetPixel(picWave.hdc, XX, YY, RGB(255, 255, 255))
  2170.         Next i
  2171.         lv = lv / 128 * 5
  2172.         rv = rv / 128 * 5
  2173.         If lv > 100 Then lv = 100
  2174.         If rv > 100 Then rv = 100
  2175.         
  2176.     Else
  2177.         Call vbmp3_getSpectrum(m_specTblL(0), m_specTblR(0))
  2178.         picWave.Cls
  2179.         Dim sp As Integer
  2180.         Dim maxCnt As Integer
  2181.         Select Case viewType
  2182.         Case 2
  2183.             sp = 1
  2184.             maxCnt = 255
  2185.         Case 3
  2186.             sp = 2
  2187.             maxCnt = 127
  2188.         Case 4
  2189.             sp = 3
  2190.             maxCnt = 85
  2191.         Case 5, 6
  2192.             sp = 4
  2193.             maxCnt = 63
  2194.         End Select
  2195.         For i = 0 To maxCnt Step sp
  2196.             If tm < m_specTblL(i * sp) Then tm = m_specTblL(i * sp)
  2197.             If tm < m_specTblR(i * sp) Then tm = m_specTblR(i * sp)
  2198.             If m_specTblL(i * sp) > m_specTblR(i * sp) Then
  2199.                 y = (picWave.Height / 70) * (m_specTblL(i * sp) - 40)
  2200.             Else
  2201.                 y = (picWave.Height / 70) * (m_specTblR(i * sp) - 40)
  2202.             End If
  2203.             If spec(i * sp) < y Then
  2204.                 spec(i * sp) = y
  2205.             Else
  2206.                 spec(i * sp) = spec(i * sp) - 100
  2207.                 If spec(i * sp) < 0 Then spec(i * sp) = 0
  2208.                 If spec(i * sp) < y Then spec(i * sp) = y
  2209.                 y = spec(i * sp)
  2210.             End If
  2211.             If spec2(i * sp) < y Then
  2212.                 spec2(i * sp) = y
  2213.                 YY = spec2(i * sp)
  2214.             Else
  2215.                 spec2(i * sp) = spec2(i * sp) - 30
  2216.                 If spec2(i * sp) < 0 Then spec2(i * sp) = 0
  2217.                 If spec2(i * sp) < y Then spec2(i * sp) = y
  2218.                 YY = spec2(i * sp)
  2219.             End If
  2220.                 
  2221.             
  2222.             y = picWave.Height - y - 10
  2223.             YY = picWave.Height - YY - 10
  2224.             
  2225.             If viewType <= 5 Then
  2226.                 For j = picWave.Height - 10 To y Step -15
  2227.                     rr = 255
  2228.                     gg = j * 255 / picWave.Height
  2229.                     gg = gg * 2 - 255
  2230.                     If gg > 255 Then gg = 255
  2231.                     If gg < 0 Then gg = 0
  2232.                     bb = 0
  2233.                     '
  2234.  API 
  2235.                     Call SetPixel(picWave.hdc, i, j / 15, RGB(rr, gg, bb))
  2236.                     'picWave.PSet (i * 15, j), RGB(rr, gg, bb)
  2237.                     If viewType >= 3 Then Call SetPixel(picWave.hdc, (i + 1), j / 15, RGB(rr, gg, bb))
  2238.                     'If viewType = 2 Then picWave.PSet ((i + 1) * 15, j), RGB(rr, gg, bb)
  2239.                 Next j
  2240.             End If
  2241.             Call SetPixel(picWave.hdc, i, YY / 15, vbYellow)
  2242.             'picWave.PSet (i * 15, YY), vbYellow
  2243.             If viewType >= 3 Then Call SetPixel(picWave.hdc, (i + 1), YY / 15, vbYellow)
  2244.             'If viewType = 2 Or viewType = 4 Then picWave.PSet ((i + 1) * 15, YY), vbYellow
  2245.         Next i
  2246.     End If
  2247.     '---- 
  2248.  ------------------------------------------------
  2249. End Sub
  2250.