Analyzes MPEG Audio files, determines the duration, bitrate and sampling frequency and reads the ID3 tag if present.
The analyzing process can be fine-tuned by setting the watchdog and max_frames properties before loading an MPEG file. Visit the Xanalyze documentation for more information about these parameters
Dim analyzer Set analyzer = WScript.CreateObject( "MP3Info.Control" ) analyzer.max_frames = 100 AnalyzeFolder( "P:\Sound\Files\MP3\Demo" ) Function AnalyzeFolder( folderspec ) Dim fso, folder, file, filescollection Set fso = CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder(folderspec) Set filescollection = folder.Files For Each file in filescollection AnalyzeFile( file.Path ) Next End Function Function AnalyzeFile( filespec ) WScript.Echo( filespec ) analyzer.OpenFile( filespec ) WScript.Echo( "Duration=" & analyzer.Duration ) WScript.Echo( "Title=" & analyzer.Title ) WScript.Echo( "Artist=" & analyzer.Artist ) WScript.Echo End Function
The MP3Info package contains 2 additional samples that demonstrate how to use the control with JScript and how to embed it in an HTML page.
The control (mp3info.dll) may be used and distributed with your application as is. There are no license fees and distribution fees. The control uses the Xaudio Xanalyze SDK and the xanalyze.dll. In order to distribute the xanalyze.dll file you must sign a license agreement with Xaudio.
If you need the source code of the control (ATL project) you can order it from WoLoSoft for $199.00.
The MP3Info.dll is a self-registering control. You must install both files, MP3Info.dll and xanalyze.dll to the same directory. It is important that you install the xaudio.dll file before you register the MP3Info control.