mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Flake: fixed minor issue in previous commit
This commit is contained in:
@@ -2257,6 +2257,7 @@ new int[] { // 30
|
|||||||
_totalSize += fs;
|
_totalSize += fs;
|
||||||
|
|
||||||
if (verify != null)
|
if (verify != null)
|
||||||
|
try
|
||||||
{
|
{
|
||||||
int decoded = verify.DecodeFrame(frame_buffer, 0, fs);
|
int decoded = verify.DecodeFrame(frame_buffer, 0, fs);
|
||||||
if (decoded != fs || verify.Remaining != bs)
|
if (decoded != fs || verify.Remaining != bs)
|
||||||
@@ -2268,6 +2269,21 @@ new int[] { // 30
|
|||||||
throw new Exception(Properties.Resources.ExceptionValidationFailed);
|
throw new Exception(Properties.Resources.ExceptionValidationFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
//if (channels == 2)
|
||||||
|
//{
|
||||||
|
// var sw = new WAVWriter(string.Format("verify_{0}.wav", this.frame_count), new WAVWriterSettings(this.Settings.PCM));
|
||||||
|
// sw.FinalSampleCount = this.frame.blocksize;
|
||||||
|
// var ab = new AudioBuffer(this.Settings.PCM, this.frame.blocksize);
|
||||||
|
// ab.Prepare(this.frame.blocksize);
|
||||||
|
// fixed (int* abs = ab.Samples, s = verifyBuffer)
|
||||||
|
// AudioSamples.Interlace(abs, s, s + Flake.MAX_BLOCKSIZE, this.frame.blocksize);
|
||||||
|
// sw.Write(ab);
|
||||||
|
// sw.Close();
|
||||||
|
//} else
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
|
||||||
if (bs < m_blockSize)
|
if (bs < m_blockSize)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -754,7 +754,6 @@ namespace CUETools.Codecs
|
|||||||
long pred = coefs[2] * (long)*(s++);
|
long pred = coefs[2] * (long)*(s++);
|
||||||
pred += c1 * (long)*(s++);
|
pred += c1 * (long)*(s++);
|
||||||
pred += c0 * (long)*(s++);
|
pred += c0 * (long)*(s++);
|
||||||
*(r++) = *s - (int)(pred >> shift);
|
|
||||||
int d = *(r++) = *s - (int)(pred >> shift);
|
int d = *(r++) = *s - (int)(pred >> shift);
|
||||||
sum += (uint)((d << 1) ^ (d >> 31));
|
sum += (uint)((d << 1) ^ (d >> 31));
|
||||||
s -= 2;
|
s -= 2;
|
||||||
|
|||||||
BIN
CUETools/CUETools.TestCodecs/hires1.flac
Normal file
BIN
CUETools/CUETools.TestCodecs/hires1.flac
Normal file
Binary file not shown.
Reference in New Issue
Block a user