bugGNU Octave - Bugs: bug #63551, 24-bit WAV files are saved as...

 
 

bug #63551: 24-bit WAV files are saved as 32-bit.

Submitter:  None
Submitted:  Mon 19 Dec 2022 08:56:30 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.3.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Dec 2022 12:27:27 PM UTC, comment #2: 

See the documentation for the equivalent function in Matlab (https://www.mathworks.com/help/matlab/ref/audiowrite.html).  In particular, "BitsPerSample" of 24 results in an output data type that is 32-bits wide.  Octave needs to maintain compatibility with Matlab so this behavior won't change.

Marking as Won't Fix and closing report.

Rik <rik5>
Group administrator
Mon 19 Dec 2022 09:18:15 PM UTC, comment #1: 

Bits per sample = 8, 16 or 32.

Anonymous
Mon 19 Dec 2022 08:56:30 PM UTC, original submission:  

Hi,

I made some audio signals and tried saving as 24-bit WAV but these are saved as 32-bit files.


>> f0=880; fs=48000; t=0:1/fs:2;
>> f=@(t,n)sum(sin(2*pi*f0*t.*(1:2:2*n-1)')./(1:2:2*n-1)');
>> y=f(t,10);
>> audiowrite('sample.wav',y',fs,'BitsPerSample',24);
>> audioinfo('sample.wav')
ans =

  scalar structure containing the fields:

    Filename = E:\Document\Octave\sample.wav
    CompressionMethod =
    NumChannels = 1
    SampleRate = 48000
    TotalSamples = 96001
    Duration = 2.0000
    BitsPerSample = 32
    BitRate = -1
    Title =
    Artist =
    Comment =


I hope it save correctly.

Best Regards,

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-20 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code