ExtractMP3

所属分类:mpeg/mp3
开发工具:C#
文件大小:229KB
下载次数:20
上传日期:2011-03-08 10:24:03
上 传 者orichisonic
说明:  截取和转换wav,mp3,mp4并且将其转换为mp4,wmv,wav格式的音乐文件
(extract wav,mp3,mp4 and convert it into wav,mp4,wmv ends file)

文件列表:
ExtractMP3\CSExtractMP3\CSExtractMP3.csproj (7343, 2011-03-07)
ExtractMP3\CSExtractMP3\Program.cs (1234, 2011-03-08)
ExtractMP3\CSExtractMP3\CSExtractMP3.Designer.cs (15108, 2011-03-08)
ExtractMP3\CSExtractMP3\Properties\Resources.resx (5612, 2006-07-07)
ExtractMP3\CSExtractMP3\Properties\Settings.settings (249, 2006-07-07)
ExtractMP3\CSExtractMP3\Properties\AssemblyInfo.cs (1268, 2006-07-07)
ExtractMP3\CSExtractMP3\Properties\Resources.Designer.cs (2848, 2011-03-07)
ExtractMP3\CSExtractMP3\Properties\Settings.Designer.cs (1091, 2011-03-07)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.exe.config (144, 2011-03-07)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.exe (30720, 2011-03-08)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.pdb (50688, 2011-03-08)
ExtractMP3\CSExtractMP3\bin\Debug\Interop.WMPLib.dll (331264, 2011-03-08)
ExtractMP3\CSExtractMP3\bin\Debug\AxInterop.WMPLib.dll (53760, 2011-03-08)
ExtractMP3\CSExtractMP3\bin\Debug\.wavoutyueding.wav.wav (44, 2011-03-03)
ExtractMP3\CSExtractMP3\bin\Debug\MP3Example.vshost.exe.config (117, 2011-03-07)
ExtractMP3\CSExtractMP3\bin\Debug\MP3Example.vshost.exe.manifest (490, 2010-03-18)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.vshost.exe.config (144, 2011-03-07)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.vshost.exe (11592, 2011-03-08)
ExtractMP3\CSExtractMP3\bin\Debug\CSExtractMP3.vshost.exe.manifest (490, 2010-03-18)
ExtractMP3\CSExtractMP3\obj\MP3Example.csproj.FileListAbsolute.txt (771, 2011-03-02)
ExtractMP3\CSExtractMP3\obj\Debug\MP3Example.Form1.resources (180, 2011-03-01)
ExtractMP3\CSExtractMP3\obj\Debug\Interop.WMPLib.dll (331264, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\MP3Example.csproj.GenerateResource.Cache (842, 2011-03-01)
ExtractMP3\CSExtractMP3\obj\Debug\AxInterop.WMPLib.dll (53760, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.pdb (50688, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll (4608, 2011-03-07)
ExtractMP3\CSExtractMP3\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache (6446, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\MP3Example.csproj.FileListAbsolute.txt (116, 2011-03-02)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.csproj.FileListAbsolute.txt (2151, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.csproj.ResolveComReference.cache (717, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.CSExtractMP3.resources (737, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.Properties.Resources.resources (180, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\GenerateResource.read.1.tlog (234, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\GenerateResource.write.1.tlog (570, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\DesignTimeResolveAssemblyReferences.cache (9619, 2011-03-08)
ExtractMP3\CSExtractMP3\obj\Debug\CSExtractMP3.exe (30720, 2011-03-08)
ExtractMP3\CSExtractMP3\CSExtractMP3.cs (13230, 2011-03-08)
ExtractMP3\CSExtractMP3\CSExtractMP3.resx (6704, 2011-03-08)
ExtractMP3\CSExtractMP3\CSExtractMP3.csproj.user (478, 2011-03-07)
ExtractMP3\CSExtractMP3\common\MCIComponent.cs (12680, 2011-03-08)
... ...

====================================================================================== Windows APPLICATION: CSExtractMP3 Overview ====================================================================================== ////////////////////////////////////////////////////////////////////////////////////// Summary: The sample demonstrates how to extract and convert the file format of audio, which includes of wav,mp3 and mp4. The sample is used to extract music file format. we usually plays music with windows media player or other some of Play softwares. If we find the music that we are favorite, we could use the function of this sample to extract it and convert it into another file format, which is provided by this sample. The sample based on the knowledge of digital communication theory is shown by converting WAVE file format into WAVE file format. The WAVE file format is a subset of Microsoft's RIFF specification for the storage of multimedia file, and it is that Microsoft and IBM cooperation of the product. A RIFF file starts out with a file header followed by a sequence of data chunks. A WAVE file is often just a RIFF file with a single "WAVE" chunk which consists of two sub-chunks--a "fmt" chunk specifying the data format data format and a "data" chunk containing the actual sample data. Call this form the "Canonical form". sequently, We extract WAV file format Using this Canonical WAVE file format when we want to convert it into itself. Another aspect of this sample is that converting WAVE into MP3 or converting WAVE into MP4. The sample will demonstrate the scenario above. All technology mentioned above is based on Expression Encoder SDK 3.0. When you install Expression Encoder 4.0, You could use vs2010 to add reference it. In this way you don't have to separate to install the SDK installation kits. At last It is important that I must use AXMediaPlayer to add start point and end point when I convert MP4 into MP4,etc. Because MCISendString, which includes in Wimm.dll, don't support MP4. And a lot of music name, named as Chinese name, don't been support either. ////////////////////////////////////////////////////////////////////////////////////// Demo: Step1. Build this project in VS2010. . Step2. Run CSExtractMP3.exe. Step3. Prepare the music file into your private folder for extract manipulate Step4. Click the button which is written as "Choose File..." and select a converted music file Step5. Click the button those used play and drag the block on the PROGRESSBAR to seek the position that you want to begin extracting, sequently you click the button which written as "beginEndpointTrim".Do the same operation to set the end of extract file. It's important that you couldn't set the extract end point before the begin point. Step6. Click the button which is written as "extract" to do so Step7. Find the path of the generated music file behind the tip which written as "the path of extractfile" ////////////////////////////////////////////////////////////////////////////////////// Code Logic: 1. The sample uses the win32 API to contact MCI with the operation about music playing. MCI stands for Media Control Interface, and it exists in Windows since the first Win3.11 with 32 bit code execution abilities (according to Microsoft). The functions that enable developers to benefit from this interface are compiled in the winmm.dll which is situated in the %windir%\system32 directory. By importing functions from this library, we get access to a variety of functions for playing Wav sounds,controlling the PC speaker, and of course, for using the MCI. The most important of all these functions is MCIERROR mciSendString(LPCTSTR lpszCommand,LPTSTR lpszReturnString,UINT cchReturn, HANDLE hwndCallback);. By using it, you can send/receive control strings for interacting with MCI, and in that way play virtually any kind of media - analog/digital video/audio, control multimedia devices, and much more. So In this sample it is used to seeking music track and amplification volume and narrowing the volume, etc. 2. The sample uses Filtering mechanism that it would extract SampleRate, NumChannels, Audio Format and BitsPerSample referenced by "The Cannonical WAVE file format". Sequently,It would general RIFF file head via caculating and fill in Sample data. At last, the sample put all of information into wav ending files. 3. The sample use Expression Encoder SDK 4.0 to general mp4 and wma file format.it includes of lots of output file format unless mp3 file format. According of forum of Expression Encoder SDK 4.0,it would improve in the further version. ////////////////////////////////////////////////////////////////////////////////////// References: Concatenating Wave Files Using C# 2005 http://www.codeproject.com/KB/audio-video/Concatenation_Wave_Files.aspx Playing MP3s using MCI http://www.codeproject.com/KB/audio-video/MP3Example.aspx Expression Encoder SDK Programming Reference http://msdn.microsoft.com/en-us/library/ff396833(v=Expression.30).aspx //////////////////////////////////////////////////////////////////////////////////////

近期下载者

相关文件


收藏者