在vb中插入音樂的方法有很多種,壹種是使用API,還有其他方法。下面的代碼是wma格式的public constriff _ ID = 1179011410 public constriff _ wave = 1163280727 public constriff _ FMT = 544。501094 '簡單RIFF波形文件的典型頭公共類型WAVInfo RIFF _ Format As Long chunk _ size As Long ChunkID As Long fmt As Long WAVE _ Format As integer channels As integer ' 0 = mono,1 = stereo samples persencond As Long average byte spelercond As Long ' 11.025 khz,22.05khz,Equal block align as integer '低級回放的塊大小 ByRef w As WAVInfo)_ As Boolean Dim ff As Integer ff = free file On Error GoTo e handler Open filename For Binary Access Read As # ff On Error GoTo e handler _ fo Get # ff,,w Close # ff On Error GoTo e handler If w . Riff _ Format = Riff _ ID And w . ChunkID = _ Riff _ WAVE And w . fmt = Riff _ FMT然後GetWaveInfo = True否則getwave info = False End If Exit Function e handler _ fo:Close # ff e handler:getwave info = False End函數
上一篇:學ios開發需要什麽基礎?如何快速學會ios開發?下一篇:【高分】無線傳感器網絡中S-MAC協議的原理和算法