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

@@ -284,10 +284,10 @@ namespace APEDotNet {
public:
APEWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate)
{
if (bitsPerSample != 16 && bitsPerSample != 24)
throw gcnew Exception("Bits per sample must be 16 or 24.");
if (channelCount != 1 && channelCount != 2)
throw gcnew Exception("Only stereo and mono audio formats are allowed.");
if (bitsPerSample != 16 && bitsPerSample != 24)
throw gcnew Exception("Monkey's Audio doesn't support selected bits per sample value.");
_path = path;
_tags = gcnew NameValueCollection();
@@ -374,6 +374,11 @@ namespace APEDotNet {
}
}
virtual property int BitsPerSample
{
int get() { return _bitsPerSample; }
}
virtual void Write(array<Int32,2>^ buff, UInt32 sampleCount)
{
if (_sampleBuffer == nullptr || _sampleBuffer.Length < sampleCount * _blockAlign)