LossyWAV support in CUETools.

Option to decode HDCD to 16-bit lossyWAV.
20-bit (in addition to 24-bit) HDCD decoding support
This commit is contained in:
chudov
2008-11-22 15:10:33 +00:00
parent bb73da55d0
commit b5008007cf
16 changed files with 941 additions and 1219 deletions

View File

@@ -28,7 +28,7 @@ namespace HDCDDotNet
public class HDCDDotNet
{
public HDCDDotNet (Int16 channels, Int32 sample_rate, bool decode)
public HDCDDotNet (Int16 channels, Int32 sample_rate, Int32 output_bps, bool decode)
{
_decoder = IntPtr.Zero;
#if !MONO
@@ -40,7 +40,7 @@ namespace HDCDDotNet
b &= hdcd_decoder_set_num_channels(_decoder, channels);
b &= hdcd_decoder_set_sample_rate(_decoder, sample_rate);
b &= hdcd_decoder_set_input_bps(_decoder, 16);
b &= hdcd_decoder_set_output_bps(_decoder, 24);
b &= hdcd_decoder_set_output_bps(_decoder, (short) output_bps);
if (!b)
throw new Exception("Failed to set up HDCD _decoder parameters.");
_decoderCallback = decode ? new hdcd_decoder_write_callback(DecoderCallback) : null;