C # obtain the information of the WAVE File Header
I asked a question in the Forum a few days ago and no one answered the question. I wrote it myself today.
File format based on website
Http://www.moon-soft.com/program/FORMAT/
Using System;
Using System. IO;
Using System. Text;
Namespace WAV
{
/// <Summary>
/// Summary description for Wav.
/// </Summary>
Public class Wav
{
Public Wav ()
{
//
// TODO: Add constructor logic here
//
}
[STAThread]
Static void Main (string [] args)
{
//
// TODO: Add code to start application here
//
String strpath = @ "C: Documents and settingsadministratorrorojanhuai Nian Zhan you.wav"; // = @ "F: Music ";
If (args. Length> 0)
{
Strpath = args [0]. Trim ();
}
If (File. Exists (strpath ))
{
GetWavInfo (strpath );
Console. WriteLine ("GetWavInfo Successfully! ");
// Console. WriteLine ("");
}
Else
{
Console. Write ("Please Enter the write filepath! ");
Console. Write ("Usage: WAV [Full Path Of Your WAV filepath]");
}
}
Public struct WavInfo
{
Public string groupid;
Public string rifftype;