Skip to content
Snippets Groups Projects
Commit 19782e6a authored by Clas Veibäck's avatar Clas Veibäck
Browse files

Added directory creation for out path and fixed a bug present in some Matlab versions.

parent b0f5cfaa
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ if nargin < 5 || isempty(show); show = true; end
if nargin < 3 || isempty(inPath); inPath = 'E:\'; end
if nargin < 2 || isempty(outPath); outPath = 'D:\Data\AudioRecorder\'; end
if ~exist(outPath); mkdir(outPath); end
inFilename = fullfile(inPath,[name '.wav']);
outFilename = fullfile(outPath,[name '.wav']);
outData = fullfile(outPath,[name '.bin']);
......@@ -31,7 +33,8 @@ if nargin < 5 || isempty(show); show = true; end
fa = fopen(outFilename, 'w');
fd = fopen(outData, 'w');
totalBytes = dir(inFilename).bytes;
fileInfo = dir(filename);
totalBytes = fileInfo.bytes;
audioBytes = 0;
dataBytes = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment