0
我有以下代碼片段,它將.amr文件放入字節數組中。AMR幀大小計算
我知道如何從頭獲取比特率,如下所示。所以假設比特率是7.95,用什麼公式來計算幀大小?謝謝。
public void getFrames() {
File inputFile = new File(getmFileName());
try {
FileInputStream fis = new FileInputStream(inputFile);
byte fileContent[]= new byte[(int) inputFile.length()];
fis.read(fileContent); // Reads the file content as byte.
fis.close();
int count = 0;
for (int i = 0; i < 8; i++) {
Log.i(LOG_TAG, "byte"+ fileContent[i]);
count++;
Log.i(LOG_TAG, "7thbyte_of_1stHeader:" + ((fileContent[7]>>3)& 0x0F));
}} catch (Exception ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
} }
由於邁克爾。我在這裏有點困惑,因爲諾基亞的規格說它的幀大小是159.所以數學不會加起來。 159/8不等於21.我錯過了什麼? – cube