LossyWAV support

This commit is contained in:
chudov
2008-11-21 20:06:11 +00:00
parent b7b78afa8a
commit 478f92236d
19 changed files with 4110 additions and 3223 deletions

View File

@@ -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);