wavread() and Matlab Coder
3 次查看(过去 30 天)
显示 更早的评论
Hello!
I have a question regarding wavread and Matlab Coder.
1. Are there any way to read in a wav file when using Matlab Coder? Unfortunately wavread() and fopen() does not work.
As I want to port my program to c-code I have an idea that I should perhaps open the file before I send it to the generated c-code. The problem arises then when working on generating suitable code: I wish to generate code that can take wav-files of different lengths. Should I just specify an input of varying size as an input to the matlab program and the generated code will work?
/Anders
1 个评论
Deepika Mallapragada
2013-8-7
Hi Anders, Did u get the solution for this question. Actually I am also facing same kind of problem. My input file is a wav file and I am unable to specify its datatype. What to do now?
回答(1 个)
Walter Roberson
2012-3-5
Unfortunately audio files can be relatively complicated these days, so especially if you need to handle more than one format, you tend to use an external C audio library to handle reading the files.
3 个评论
Walter Roberson
2012-3-5
Is that PCM, Microsoft ADPCM, IMA ADPCM, G.723 ADPCM, G.721 ADPCM, G.711 a-law, G.711 µ-law, GSM 6.10, MPEG, other?
http://www.sonicspot.com/guide/wavefiles.html
MATLAB source for PCM only reading is at http://www.soundslogical.com/support/mpacks/documentation/english/documentparts/wavin.html
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!