mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
CUETools.Codecs.FLAKE: split classes into separate files.
This commit is contained in:
37
CUETools.Codecs.FLAKE/FlacSubframeInfo.cs
Normal file
37
CUETools.Codecs.FLAKE/FlacSubframeInfo.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
|
||||
namespace CUETools.Codecs.FLAKE
|
||||
{
|
||||
unsafe public class FlacSubframeInfo
|
||||
{
|
||||
public FlacSubframeInfo()
|
||||
{
|
||||
best = new FlacSubframe();
|
||||
lpc_ctx = new LpcContext[lpc.MAX_LPC_WINDOWS];
|
||||
for (int i = 0; i < lpc.MAX_LPC_WINDOWS; i++)
|
||||
lpc_ctx[i] = new LpcContext();
|
||||
}
|
||||
|
||||
public void Init(int* s, int* r, int bps, int w)
|
||||
{
|
||||
if (w > bps)
|
||||
throw new Exception("internal error");
|
||||
samples = s;
|
||||
obits = bps - w;
|
||||
wbits = w;
|
||||
best.residual = r;
|
||||
best.type = SubframeType.Verbatim;
|
||||
best.size = AudioSamples.UINT32_MAX;
|
||||
for (int iWindow = 0; iWindow < lpc.MAX_LPC_WINDOWS; iWindow++)
|
||||
lpc_ctx[iWindow].Reset();
|
||||
done_fixed = 0;
|
||||
}
|
||||
|
||||
public FlacSubframe best;
|
||||
public int obits;
|
||||
public int wbits;
|
||||
public int* samples;
|
||||
public uint done_fixed;
|
||||
public LpcContext[] lpc_ctx;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user