How to convert from PCM samples to decoded audio in wav/wmv format?

6 ビュー (過去 30 日間)
Star
Star 2017 年 1 月 18 日
編集済み: Star 2017 年 1 月 18 日
I have came across the mp3 decoder coding from here.
It is shown that the coding to convert two granules into left and right channel to send to speakers is as below:
if isempty(out_PCM_samples)
out_PCM_samples(1,1:1152) = [temp_PCM_samples(1,:) temp_PCM_samples(3,:)]; %channel 1
out_PCM_samples(2,1:1152) = [temp_PCM_samples(2,:) temp_PCM_samples(4,:)]; %channel 2
else
length_PCM = numel(out_PCM_samples(1,:));
out_PCM_samples(1,length_PCM+1:length_PCM+1152) = [temp_PCM_samples(1,:) temp_PCM_samples(3,:)]; %channel 1
out_PCM_samples(2,length_PCM+1:length_PCM+1152) = [temp_PCM_samples(2,:) temp_PCM_samples(4,:)]; %channel 2
end
In what way can I output the decoded audio which is playable instead of just showing it in PCM samples?

回答 (0 件)

カテゴリ

Help Center および File ExchangePCM についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by