octave-maintainers
[Top][All Lists]
Advanced

[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: Fri, 26 Oct 2012 19:13:58 +0200

> 1. If you pass in an integer vector and do *not* specify N, does the integer 
> size select the default value of N?

In Matlab the default value for N is always 16. The following commands return 
identical files:
>> wavwrite( int8(( -128:127 ), 'wavTst8.wav' )
>> wavwrite( int16(( -128:127 ), 'wavTst16.wav' )
>> wavwrite( int32(( -128:127 ), 'wavTst32.wav' )

> 2. If you pass in an integer vector but a mismatched value for N, are the 
> samples clipped or does wavwrite report an error? For example if y is an 
> int16 or int32 vector and N=8?

If the value is too large, the samples are clipped and a warning is displayed.


reply via email to

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