search for: totalsampl

Displaying 6 results from an estimated 6 matches for "totalsampl".

Did you mean: totalsamples
2010 Jun 23
3
FLAC StreamInfo Parsing
Thank you very much! But how to deal with endianness in the case of bit stream? Some blocks (for example MinBlockSize) require 16bits (simply swap first and second), some block (e.g.MinFrameSize) require 3 byte-array to be reverted. Finally totalSamples is stored in 5 bytes ( only last 4 bits from first one byte are used). It was a real issue to make it little-endian (here is how I did it: http://code.google.com/p/sharpflac/source/browse/trunk/SharpFlac/Blocks/StreamInfo.cs). So to make stream little endian, I can't simple get each 4 bytes...
2010 Jun 23
0
FLAC StreamInfo Parsing
...21:27, Ilia Ternovich wrote: > Thank you very much! But how to deal with endianness in the case of > bit stream? Some blocks (for example MinBlockSize) require 16bits > (simply swap first and second), some block (e.g.MinFrameSize) require > 3 byte-array to be reverted. > > Finally totalSamples is stored in 5 bytes ( only last 4 bits from > first one byte are used). It was a real issue to make it little-endian > (here is how I did it: > http://code.google.com/p/sharpflac/source/browse/trunk/SharpFlac/ > Blocks/StreamInfo.cs). > > So to make stream little endian, I can...
2010 Jun 23
1
FLAC StreamInfo Parsing
...quest more than 32 bits. > > In other words, instead of: > > GetEndianBytes(streamArray, streamOffset, numBytes); > > ... you should implement: > > (long long)GetBigEndianStreamBits(streamHandle, (unsigned)numBits); > > The return value will have to be 64-bit to handle totalSamples. > The nice thing is that you won't need any indexing or bit shifting, > because GetBigEndianStreamBits() will directly return the value you > ask for, based upon the number of bits requested.
2010 Jun 22
2
FLAC StreamInfo Parsing
Hello Ilia, The FLAC format by nature is not a byte stream, it's a bit stream. Therefore, in order to parse it you need too build a bit-reading infrastructure. Eg. a class that accepts a byte stream, implements buffering, etc, etc, and supports reading a specified number of bits, not bytes as you are used to. There is quite a lot of bit logic there, but nothing too scary. Best Regards,
2003 Aug 30
1
Fink's vorbis-tools patch
...wt", 4) ) + { + bigendian = 0; + } else if(memcmp(buffer+18, "NONE", 4)) { fprintf(stderr, _("Warning: Can't handle compressed AIFF-C\n")); @@ -301,7 +307,7 @@ aiff->channels = format.channels; aiff->samplesize = format.samplesize; aiff->totalsamples = format.totalframes; - aiff->bigendian = 1; + aiff->bigendian = bigendian; opt->readdata = (void *)aiff; diff -urN vorbis-tools-1.0.orig/acinclude.m4 vorbis-tools-1.0/acinclude.m4 --- vorbis-tools-1.0.orig/acinclude.m4 Fri Jul 12 18:24:54 2002 +++ vorbis-tools-1.0/acinclude.m4...
2006 Sep 11
4
encode, decode and encode again
(I've already posted this message month ago, but nobody answered, may be it was not delivered to newsgroup?) Hello, All. I wrote an encoder-decoder based on example from OGG-Vorbis SDK. This encoder can encode a large amount of small WAV-files with equal parameters into one sound archive. Then I decode this sound archive back into large amount of small WAV-files. Theese files are