欢迎光临
我们一直在努力

取得wav文件信息_visualbasic教程

建站超值云服务器,限时71元/月

WAV文件基本信息包括如是否立体声,采样频率等。
声明:
PublicConstRIFF_ID=1179011410
PublicConstRIFF_WAVE=1163280727
PublicConstRIFF_FMT=544501094
TypicalheaderofasimpleRIFFWAVEfile
PublicTypeWAVInfo
Riff_FormatAsLong
chunk_sizeAsLong
ChunkIDAsLongfmtAsLong
Wave_FormatAsInteger
ChannelsAsInteger0=单声道,1=立体声
SamplesPerSecondAsLong
AverageBytesPerSecondAsLong11.025kHz,22.05kHz,等
BlockAlignAsIntegerSizeofblocksforlowlevelplayback
EndType
函数:
PublicFunctionGetWaveInfo(ByvalfilenameAsString,ByrefwAsWAVInfo)_
AsBoolean

DimffAsInteger
ff=FreeFile

OnErrorGoToehandler
OpenfilenameForBinaryAccessReadAs#ff

OnErrorGoToehandler_fo
Get#ff,,w
Close#ff

OnErrorGoToehandler

Ifw.Riff_Format=RIFF_IDAndw.ChunkID=_
RIFF_WAVEAndw.fmt=RIFF_FMTThen

GetWaveInfo=True
Else
GetWaveInfo=False
EndIf

ExitFunction

ehandler_fo:
Close#ff
ehandler:
GetWaveInfo=False
EndFunction->

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 取得wav文件信息_visualbasic教程
分享到: 更多 (0)