[Stk] Using 24bit wav andd aiff files
Richard Dobson
richarddobson at blueyonder.co.uk
Tue Jun 21 01:48:19 PDT 2011
Any WAVE file used to hold 24bit audio needs to be written as
WAVEFORMATEXTENSIBLE (WAVEX); ditto for channel counts above stereo, and
sample rates above 48KHz. The stk code does really need expanding to
include support for WAVEX. This format has been around for over 20 years
now, so there should be no thought that it is in any way unusual or
non-standard. This incidentally also has expliit support for sample
container sizes larger than sample sizes, e.g. 20bit audio in 24bit
containers. Unfortunately I do not have the time to make such a
large-scale addition myself at the moment. I suppose linking with
libsndfile is out of the question licence-wise?
NB also: AIFF/AIFF-C does not allow four bytes to be used to contain
24bit audio. Anything stored in 32bits should be consistent with respect
to the 0DbFS level - so the three bytes of the word should be
left-aligned - becoming effectively heavily quantised 32bit samples.
Richard Dobson
On 20/06/2011 22:06, Carlos Luna wrote:
>
> Hi Gary. From what I´ve found, the first problem is here: bool
> FileRead :: getWavInfo( const char *fileName ){...... if ( format_tag
> == 1 ) { if (temp == 8) dataType_ = STK_SINT8; else if
> (temp == 16) dataType_ = STK_SINT16; else if (temp == 32)
> dataType_ = STK_SINT32; } ......} That part of the code never checks
> for 24 bits files, so loading such files always returns an error. I
> changed it to: .....if ( format_tag == 1 ) { if (temp == 8)
....
More information about the Stk
mailing list