2013-06-29 52 views
0

我使用Sound :: readData的Fmod.dll從mp3文件中獲取數據;Sound :: readData的Fmod.dll返回空數組

void * pointer1 = new byte [4096]; unsigned int length;

system - > createSound(filePath,FMOD_OPENONLY | FMOD_ACCURATETIME,NULL,& sound);

sound-> readData(pointer1,4096,& length);

但是所有的4096字節都是0,有人知道有什麼問題嗎?

回答

0

FMOD_ACCURATETIME標誌可能使其掃描到文件的末尾,所以你得到了一個EOF,你有沒有檢查錯誤代碼? 刪除FMOD_ACCURATETIME或嘗試sound-> seekData(0);在readdata調用之前