problem loading sound files

2 views
Skip to first unread message

Ann Warde

unread,
Dec 15, 2007, 3:02:18 PM12/15/07
to xbat-devel
15Dec2007

A. When attempting to add the file stream Pillar:
\VOL3\CCB16_070221\CCB16_070221_AIFF, I encountered the error, for
multiple different file names: 'The sound "', name, '" seems to have a
corrupt file: '

B. This was generated from line ~106-117 in C:\XBAT_R5\Core\Sound
\get_file_info.m, that is:

if isempty(info_k)

info = []; close(pal);

[ignore, name] = fileparts(fileparts(p));

disp(['The sound "', name, '" seems to have a corrupt file: ',
p, f{k}]);

return;

end

Apparently info_k had been set to [] for the file that generated the
error.

C. When I set a breakpoint at line ~109, then ran line 94 again, which
is:
info_k = sound_file_info([p, f{k}]);

info_k was set to a structure, and so was then not empty.

D. I inserted the following lines of code:

line 94: info_k = sound_file_info([p, f{k}]);

if isempty(info_k)

% --- AMW 15Dec2007 - begin --- %
% Wait, then try again...
pause(3);
disp('pausing...')
info_k = sound_file_info([p, f{k}]);
end

% If it really is empty...
if isempty(info_k)
% --- AMW 15Dec2007 - end --- %

info = []; close(pal);

[ignore, name] = fileparts(fileparts(p));

disp(['The sound "', name, '" seems to have a corrupt file: ',
p, f{k}]);

return;

end

E. The first time I ran this code, the error message generated by the
function C:\XBAT_R5\Core\Sound\sound_file_info.m appeared:

line 72: error_prefix = 'Unable to get sound file information from ';

%--
% try to get format handler
%--

format = get_file_format(f);

%--
% read file using handler
%--

try
info = format.info(f);
catch
info = []; disp([error_prefix, '''', f, ''': ']); disp(lasterr);
return;
end

F. However, the sound appeared to load (with some instances of the
"corrupt file" message generated by get_file_info.m).

G. I then deleted the sound from the Xbat palette, and tried loading
the file stream again. This time the sound loaded successfully.

H. I have saved my altered version of get_file_info.m, and have
updated the Xbat code from SVN in order to remove my alterations.
Reply all
Reply to author
Forward
0 new messages