필터 지우기
필터 지우기

wavread() and Matlab Coder

조회 수: 2 (최근 30일)
Andreas
Andreas 2012년 3월 5일
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
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
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
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
Andreas
Andreas 2012년 3월 5일
I think I can go with whatever format that makes it easiest given that I can convert between them outside of matlab. So this PCM-reading will work with the coder?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Code Generation and Deployment에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by