2009-02-21 45 views
2

有沒有人知道Audible Audio(.aa)文件規範有很好的資源?Audible Audio(.aa)文件規格?

我想寫一個程序,可以使用它們,如果沒有人知道的資源,任何提示反向工程規範我自己?我用一個十六進制編輯器打開它,四處張望,看起來像MP3,但有更多的標題信息。

+1

GOLDWAVE(www.goldwave.com)能讀懂他們,但我認爲他們被告知停止,DRM – kjack 2009-02-21 19:01:37

回答

2

我做了一些研究,在聲音標題爲我的汽車收音機/計算機創建一個播放器。基本上,在文件開始處有一個3700個字符的塊,它包含許多感興趣的字段,例如Title,Author,Narrator等。我在C#中使用了一些有限的解析代碼來顯示一些基本信息.aa文件。如下所示:

private void ParseFields(string fileName) 
    { 
     string aaHeader; 
     string tryDate; 
     if (fileName == "") return; 

     using (StreamReader sr = new StreamReader(fileName)) 
     { 
      char[] buff = new char[3700]; 
      sr.Read(buff, 0, buff.Length); 
      aaHeader = new string(buff); 
     } 
     try 
     { 
      _author = GetParsedItem(aaHeader, "author"); 
     } 
     catch 
     { 
      _author = "?"; 
     } 
     try 
     { 
      _title = GetParsedItem(aaHeader, "short_title"); 
     } 
     catch 
     { 
      _title = "???"; 
     } 
     try 
     { 
      _narrator = GetParsedItem(aaHeader, "narrator"); 
     } 
     catch 
     { 
      _narrator = "?"; 
     } 
     try 
     { 
      _description = GetParsedItem(aaHeader, "description"); 
     } 
     catch 
     { 
      _description = "???"; 
     } 
     try 
     { 
      _longDescription = GetParsedItem(aaHeader, "long_description"); 
     } 
     catch 
     { 
      _longDescription = ""; 
     } 
     try 
     { 
      tryDate = GetParsedItem(aaHeader, "pubdate"); 
      if (tryDate != "") 
       _pubDate = Convert.ToDateTime(GetParsedItem(aaHeader, "pubdate")); 
      else 
       _pubDate = DateTime.Today; 
     } 
     catch 
     { 
      _pubDate = DateTime.Today; 
     } 
    } 
    private string GetParsedItem(string buffer, string fieldName) 
    { 
     if (buffer.Contains(fieldName)) 
     { 
      int pos = buffer.IndexOf(fieldName); 
      pos += fieldName.Length; 
      int posEnd = buffer.IndexOf('\0',pos); 
      //if the value for the field is empty, skip it and look for another 
      if (pos == posEnd) 
      { 
       pos = buffer.IndexOf(fieldName, posEnd); 
       pos += fieldName.Length; 
       posEnd = buffer.IndexOf('\0', pos); 
      } 
      return buffer.Substring(pos, posEnd - pos); 
     } 
     else 
      return "(not found - " + fieldName + ")"; 
    } 
1

我認爲,沒有規範。看看Wikipedia/Audible.com

報價:

[...] 
Audible introduced one of the first digital audio players in 1997. 
The following year it published a Web site from which audio files in its 
proprietary .aa format could be downloaded. Audible holds a number of patents 
in this area. 
[...] 

摘要:專有/專利