Includes 2 functions to write and read OGG Vorbis files. It works like the commands WAVWRITE and WAVREAD.
1.- Just unpack in the toolbox folder under the MATLAB directory.
2.- Set the MATLAB search path to include that folder.
This version was made in MATLAB for WINDOWS only.
Alfredo Fernandez (2020). Vorbis ogg audio encoding/decoding (https://www.mathworks.com/matlabcentral/fileexchange/10061-vorbis-ogg-audio-encoding-decoding), MATLAB Central File Exchange. Retrieved .
It works fine with mono files.
However, it seems that there is a problem with stereo files.
I have data collected from a stereo WAV file and stored in a matrix with two columns. But, the created OGG file is not readable (5ko).
I keep getting this message
??? Error using ==> wavread
Cannot open file.
Error in ==> oggread at 68
[Y,FS,NBITS] = wavread(tmpfile); % Load the data and delete temporary file
I think that it has to do something with an error creating the temp.wav file
I was also getting a "Error while decodong file. File may be corrupted", but the quotes thing wasn't the issue. I just commented out the error message on line 66 and now it works like a charm.
Oggread fails with exception "Error while decodong file. File may be corrupted" when the 'install' folder contains spaces.
Add double quotes on lines 41 and 64 to solve this problem.