mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
LossyWAV support
This commit is contained in:
@@ -468,6 +468,7 @@ namespace FLACDotNet {
|
||||
_compressionLevel = 5;
|
||||
_paddingLength = 8192;
|
||||
_verify = false;
|
||||
_blockSize = 0;
|
||||
_tags = gcnew NameValueCollection();
|
||||
|
||||
_encoder = FLAC__stream_encoder_new();
|
||||
@@ -517,6 +518,14 @@ namespace FLACDotNet {
|
||||
}
|
||||
}
|
||||
|
||||
virtual property Int64 BlockSize
|
||||
{
|
||||
void set(Int64 value)
|
||||
{
|
||||
_blockSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool SetTags (NameValueCollection^ tags)
|
||||
{
|
||||
_tags = tags;
|
||||
@@ -580,7 +589,7 @@ namespace FLACDotNet {
|
||||
FLAC__StreamEncoder *_encoder;
|
||||
bool _initialized;
|
||||
String^ _path;
|
||||
Int64 _finalSampleCount, _samplesWritten;
|
||||
Int64 _finalSampleCount, _samplesWritten, _blockSize;
|
||||
Int32 _bitsPerSample, _channelCount, _sampleRate;
|
||||
Int32 _compressionLevel;
|
||||
Int32 _paddingLength;
|
||||
@@ -657,6 +666,9 @@ namespace FLACDotNet {
|
||||
|
||||
FLAC__stream_encoder_set_compression_level(_encoder, _compressionLevel);
|
||||
|
||||
if (_blockSize > 0)
|
||||
FLAC__stream_encoder_set_blocksize(_encoder, (unsigned)_blockSize);
|
||||
|
||||
pathChars = Marshal::StringToHGlobalUni(_path);
|
||||
hFile = _wfopen((const wchar_t*)pathChars.ToPointer(), L"w+b");
|
||||
Marshal::FreeHGlobal(pathChars);
|
||||
|
||||
Reference in New Issue
Block a user