able to use sound function in old code

1 回表示 (過去 30 日間)
Sean Lineaweaver
Sean Lineaweaver 2014 年 10 月 30 日
回答済み: Star Strider 2014 年 10 月 30 日
I am trying to run some old code. It's about five years old. The code using utilizes the following generic functionality:
[sig fs] = wavread('test.wav');
sound(sig,fs);
This seems pretty basic but it draws the following error message:
Error using sound (line 76)
Error: File: audioplayer.m Line: 474 Column: 20
Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name:
"multimedia.internal.audio.device.DeviceInfo" fails this test.
I realize that Matlab has migrated to an audioplayer object, but is there an override switch I can call that will allow me to use the old sound.m function?

採用された回答

Star Strider
Star Strider 2014 年 10 月 30 日
The wavread and sound functions still exist and function well (in R2014b) so they shouldn’t be the problem. The error is in the sound call, so I would see what ‘sig’ and ‘fs’ are and that they’re valid.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by