[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [OctDev] wavwrite() with integer arguments
From: |
Froebe, Matej |
Subject: |
AW: [OctDev] wavwrite() with integer arguments |
Date: |
Wed, 24 Oct 2012 11:21:47 +0200 |
Hi,
Thank you for your answer. The modified function is in the attachment. The
difference is just the added if statement around the multiplications:
if isa(yi, 'float')
## scale samples
switch (bits_per_sample)
case 8
yi = round (yi*128 + 128);
case 16
yi = round (yi*32768);
case 32
yi = round (yi*2147483648);
endswitch
endif
-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von Jordi Gutiérrez
Hermoso
Gesendet: Montag, 22. Oktober 2012 20:31
An: Froebe, Matej
Cc: address@hidden; Octave Maintainers List
Betreff: Re: [OctDev] wavwrite() with integer arguments
Hi,
On 22 October 2012 13:44, Froebe, Matej <address@hidden> wrote:
> I need to write integer values to wav file, so I modified the
> wavwrite function. Its behavior now depends on data input type (for
> floats the input data range is -1.0 to 1.0).
>
> Does it make sense, to include this small change in the package? If
> yes, how do I proceed?
You have found the Octave Forge mailing list which is for add-on packages to
Octave, not for Octave itself. The wavwrite function is in core Octave, so its
modifications should be discussed on the maintainers' list itself,
address@hidden, CC'ed here.
As to how to actually produce the changes, show us what they are first. If you
have the desire to undertake the necessary paperwork to get it accepted, please
read these:
http://jordi.inversethought.com/blog/how-to-write-a-patch-for-octave/
http://www.gnu.org/software/octave/doc/interpreter/Contributing-Guidelines.html
wavwrite.m
Description: wavwrite.m