add live select pannel

This commit is contained in:
CroakFang
2023-01-20 07:13:54 +08:00
parent 3b18268252
commit a4dc2516e3
1543 changed files with 107369 additions and 9227 deletions
@@ -0,0 +1,44 @@
using System.IO;
namespace DereTore.Exchange.Audio.HCA
{
public sealed class OneWayHcaDecoder : HcaDecoder
{
public OneWayHcaDecoder(Stream sourceStream)
: base(sourceStream)
{
}
public OneWayHcaDecoder(Stream sourceStream, DecodeParams decodeParams)
: base(sourceStream, decodeParams)
{
}
public uint DecodeBlocks(byte[] buffer)
{
if (!HasMore)
{
return 0;
}
var decodedBlockCount = DecodeBlocks(buffer, _blockIndex);
_blockIndex += decodedBlockCount;
return decodedBlockCount;
}
public bool HasMore
{
get
{
return (_blockIndex < HcaInfo.BlockCount);
}
}
public uint LengthInSamples { get { return HcaHelper.CalculateLengthInSamples(HcaInfo); } }
public float LengthInSeconds { get { return HcaHelper.CalculateLengthInSeconds(HcaInfo); } }
private uint _blockIndex = 0;
}
}