octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45490] audiowrite / wavwrite writes 32bit sam


From: Rik
Subject: [Octave-bug-tracker] [bug #45490] audiowrite / wavwrite writes 32bit samples as int32 instead of float32
Date: Fri, 1 Sep 2017 19:23:12 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #45490 (project octave):

                  Status:               Confirmed => Patch Submitted        

    _______________________________________________________

Follow-up Comment #4:

Any action on this bug?  There is a table at
https://www.mathworks.com/help/matlab/ref/audiowrite.html that Octave should
follow.  It lists the output format which depends on the file extension
('.wav'), the class of the input, and the number of bits per sample.

I tried 


audiowrite ('single32.wav', xs, 8000, 'BitsPerSample', 32)
audiowrite ('int32.wav', xint32, 8000, 'BitsPerSample', 32)


and then in the shell I used 'file' to check the resulting WAV formats.  Both
files are


int32.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 32 bit, mono
8000 Hz


It sounded like Mike thought this would be very easy.  I made a stab at it and
am attaching the patch to this report.  I also changed the output to PCM32
when Bits Per Sample is 24 for compatibility with Matlab.  I also added a
decode for Bits Per Sample == 64 which maps to SF_DOUBLE_FORMAT.


(file #41712)
    _______________________________________________________

Additional Item Attachment:

File name: bug45490.cset                  Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45490>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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