Author Topic: BASSEnc and Flac with multi channel audio  (Read 1335 times)

3delite

  • Posts: 907
BASSEnc and Flac with multi channel audio
« on: 14 Jun '12 - 12:13 »
Hi!

Trying to encode a multi channel 5.1 audio file with Flac which is saved by BASSEnc with the following flags:

Code: [Select]
       EncoderFlags := BASS_ENCODE_PCM OR BASS_UNICODE OR BASS_ENCODE_RF64 OR BASS_ENCODE_AUTOFREE OR BASS_ENCODE_FP_24BIT;

But no output is generated, the following error is given by Flac:

Code: [Select]
WARNING: skipping unknown sub-chunk 'JUNK' (use --keep-foreign-metadata to keep)
WARNING: legacy WAVE file has format type 1 but bits-per-sample=24
ERROR: WAVE has >2 channels but is not WAVE_FORMAT_EXTENSIBLE; cannot assign channels

Could this WAVE_FORMAT_EXTENSIBLE channel mapping data to be included with BASSEnc's WAV PCM saving, please?
I am trying to achieve maximum quality (I am working on a converter, especially to support multi channel conversion) so I would need this with all possible combinations (16/24/32bit integer/32bit floating point/all possible channel count from 1 to 8 ).

Documentation: WAV Audio File Format Specifications
About speaker configuration: Multiple Channel Audio Data and WAVE Files
« Last Edit: 14 Jun '12 - 12:38 by 3delite »

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASSEnc and Flac with multi channel audio
« Reply #1 on: 14 Jun '12 - 15:59 »
Here's an update to try...

   www.un4seen.com/stuff/bassenc.dll

It adds the following BASS_Encode_Start/Limit flag for a WAVEFORMATEXTENSIBLE "fmt" chunk...

Code: [Select]
#define BASS_ENCODE_WFEXT 0x400

It isn't currently possible to specify a custom channel mask (dwChannelMask); a standard mask will be used based on the number of channels (0 will be used if there are more than 8 channels). Let me know if you have any trouble with it.

3delite

  • Posts: 907
Re: BASSEnc and Flac with multi channel audio
« Reply #2 on: 15 Jun '12 - 15:43 »
Seems working fine.

Thank you!