%  Play a sound using the sound recorder
%
%  Version 4, 3/2-2003, by JAJ
%  Version 5, 4/9-20173, by JAJ
%     Updated with new reading of wav files

function res = play (file_name)

%file_name=['waves/',file_name];

%  Make the command for Windows

%[y,fs]=wavread(file_name);
[y,fs]=audioread([file_name,'.wav']);

%  Make the command for windows Linux

%cmd=['!xmms ',file_name,'.wav &'];

%  Execute the command

%eval(cmd);
sonogram (file_name)
sound(y,fs)
