Guidance
指路人
g.yi.org
software / rapidq / Examples / Audio & Video / Playmusic.inc / playmusic.inc

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

  
' This file contains some easy to use function for playing music files.
' You can play every type that's supported by WINMM.DLL.
' mOpen		: Loads a file.
' mPlay		: Starts playing a file or resume playing after pause.
' mPause	: Pause playing until you call mPlay again.
' mStop		: Close music file. You'll have to open it again with mOpen if you want to play it again.
' I had some trouble playing .WAV files, but luckily there's some function called "playwav" in RapidQ :).
' Greets, Kipmans o_0

     DECLARE FUNCTION mciExecute LIB "winmm.dll" ALIAS "mciExecute" (BYVAL lpstrCommand AS STRING) AS LONG


     DECLARE SUB mOpen(File AS STRING)
     DECLARE SUB mPlay
     DECLARE SUB mPause
     DECLARE SUB mStop

     DIM CurrentMusicFile AS STRING

     SUB mOpen(File AS STRING)
      mciExecute("Open "+File)
      CurrentMusicFile = File
     END SUB

     SUB mPlay
      mciExecute("Play "+CurrentMusicFile)
     END SUB

     SUB mPause
      mciExecute("Pause "+CurrentMusicFile)
     END SUB

     SUB mStop
      mciExecute("Close "+CurrentMusicFile)
     END SUB
掌柜推荐
 
 
¥738.00 ·
 
 
¥1,480.00 ·
 
 
¥397.00 ·
 
 
¥950.00 ·
 
 
¥264.00 ·
 
 
¥1,005.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2004-04-12 03:02:31