[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8

From: imad imadero
Subject: [Octave-bug-tracker] [bug #56889] Incorrect encoding results from uint8 vector to wav file
Date: Sat, 14 Sep 2019 17:03:54 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Follow-up Comment #2, bug #56889 (project octave):

the problem with audiowrite function is that it do not encode 0,253,254,255
values as uint8() to the wav file.
to verify this I propose the following code:

% test audiowrite function for uint8 vector
for k=1:32
  y(k)=256-k; %%%%% last 32 bytes in the field 2^8.
audiowrite(f,uint8(y),Fs,'BitsPerSample',8);% values 255,254,253 could not be
writen into the file !!!!
audioread(f,'native') %% check results written to the file

note: the code above works well on Matlab thus encoding all uint8 valuse
including 0,253,254 and 255.


Reply to this item at:


  Message posté via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]