Why do wavwrite and audiowrite produce different results?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am transitioning from wavwrite to audiowrite and encountered the problem that wavread and audioread do not always produce identical wav files. For example the code
y = repmat((1:750)', 1, 3);
wavwrite(y, 500, 32, 'test1.wav');
audiowrite('test2.wav', y, 500, 'BitsPerSample', 32);
fid = fopen('test1.wav');
test1 = fread(fid);
fclose(fid);
fid = fopen('test2.wav');
test2 = fread(fid);
fclose(fid);
length(test1)
length(test2)
returns 9044 and 9096. Why is that and how can I reproduce the results from wavwrite in my existing code with audiowrite?
PS: I am aware of audioread, but that is not an option here.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!