Why do I get errors when I replaced calls to signalblks​.Multimedi​aFileReade​r and/or signalblks​.Multimedi​aFileWrite​r with calls to dsp.AudioFileReader and dsp.AudioFileWriter respectively in Signal Processing Blockset 7.1 (R2010b) ?

1 回表示 (過去 30 日間)
I have code that uses signalblks.MultimediaFileReader and/or signalblks.MultimediaFileWriter System Objects which works fine in R2010a. When I upgraded to R2010b, I received warnings that the name has been changed. However, when I replaced calls to signalblks.MultimediaFileReader and/or signalblks.MultimediaFileWriter with calls to dsp.AudioFileReader and dsp.AudioFileWriter respectively, I received some cryptic error messages.
For example, when I executed the following code:
h = dsp.AudioFileReader;
close(h)
I received the following error message:
??? Error using ==> horzcat
System objects do not support concatenation.
Error in ==> close at 67
h = [h cur_arg]; %#ok

採用された回答

MathWorks Support Team
MathWorks Support Team 2010 年 10 月 19 日
In Signal Processing Blockset 7.1 (R2010b), signalblks.MultimediaFileReader and signalblks.MultimediaFileWriter System Objects were renamed to dsp.AudioFileReader and dsp.AudioFileWriter respectively. With the rename, users who use the old System Object name are warned/ advised to switch to the new names. But the new System Objects also have some methods removed and some properties renamed. This might cause errors if the old methods/ properties are used in the code. The list of changes are given below.
1. The "close" method was renamed to "release". Using the close method on new classes will throw an error.
2. The "Audio" string in property names AudioSampleRate, SamplesPerAudioFrame and AudioOutputDataType in signalblks.MultimediaFileReader were removed in dsp.AudioFileReader (i.e. new property name is SampleRate).
3. The "AudioCompressor" property was renamed to "Compressor".
4. The VideoInputPort and VideoCompressor properties were removed in dsp.AudioFileWriter.
5. dsp.AudioFileReader and dsp.AudioFileWriter can no longer be used with video files (this was allowed using the old System Object when Video and Image Processing Blockset was installed).
To resolve the errors when using the new System Objects, the code needs to be updated to use the new property names.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with DSP System Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by