Re: [flac-dev] Two questions

2021-08-09 Thread Brian Willoughby
On Aug 9, 2021, at 11:31, Martijn van Beurden wrote: > Op zo 8 aug. 2021 06:24 schreef Federico Miyara : >> As I wanted to stop at sample Nend, I used Nend + 1, instead, to ensure that >> the sample Nend is the last one. > > Considering Nend, did the count start at 0 or at 1? The flac utility st

Re: [flac-dev] Two questions

2021-08-09 Thread Martijn van Beurden
Op zo 8 aug. 2021 06:24 schreef Federico Miyara : > > As I wanted to stop at sample Nend, I used Nend + 1, instead, to ensure > that the sample Nend is the last one. > > Considering Nend, did the count start at 0 or at 1? The flac utility starts counting at 0 AFAIK, if your count starts at 1, that

Re: [flac-dev] Two questions

2021-08-07 Thread Federico Miyara
Martijn, I've discovered exactly why I was getting that skip/until error. I was just following what the flac detailed help (flac --explain) says:   --until={#|[+|-]mm:ss.ss}  Stop at the given sample number for each input    file.  The given sample number is n

Re: [flac-dev] Two questions

2021-08-04 Thread Federico Miyara
Martijn, If you are looking for a tool, take a look at the metaflac command line utility. metaflac --list file.flac returns all metadata in a FLAC file Thanks, this is very interesting. 2) I decode using the option --skip=0 --until=1. I would expect to get a wav file with only 1 sample, but

Re: [flac-dev] Two questions

2021-08-04 Thread Brian Willoughby
On Aug 4, 2021, at 00:10, Federico Miyara wrote: > Brian, > > Once more, thanks for taking your time to answer my questions and provide > interestig insights. Some comments below. > >> I recommend writing your own utility based on the FLAC library, in C, with >> the features you want. I do no

Re: [flac-dev] Two questions

2021-08-04 Thread Martijn van Beurden
Op ma 2 aug. 2021 om 17:40 schreef Federico Miyara : > > Dear All, > > 1) Is there a way to get the audio size (number of samples) and other > information, such as number of channels, from a flac file without fully > decoding it? > I've found that the WAV header is replicated after the "riffRIFF"

Re: [flac-dev] Two questions

2021-08-02 Thread Brian Willoughby
On Aug 2, 2021, at 19:19, Federico Miyara wrote: > Brian, > > Thanks for your reply. > >> You should not use the RIFF information. It is not part of the FLAC >> specification. It is an optional enhancement to store information that is >> only about the input WAV files. It will strictly be m

Re: [flac-dev] Two questions

2021-08-02 Thread Federico Miyara
Brian, Thanks for your reply. Yes. There is a specific header with this information. Look for the documentation of the FLAC format for reference, and then look through the library for calls that might return this information. OK, I'll see that later. You should not use the RIFF information

Re: [flac-dev] Two questions

2021-08-02 Thread Brian Willoughby
On Aug 2, 2021, at 08:40, Federico Miyara wrote: > 1) Is there a way to get the audio size (number of samples) and other > information, such as number of channels, from a flac file without fully > decoding it? Yes. There is a specific header with this information. Look for the documentation

[flac-dev] Two questions

2021-08-02 Thread Federico Miyara
Dear All, 1) Is there a way to get the audio size (number of samples) and other information, such as number of channels, from a flac file without fully decoding it? I've found that the WAV header is replicated after the "riffRIFF" keyword, but I don't seem to be able to predict where it is lo

Re: [flac-dev] Two questions about RG in flac

2014-06-06 Thread lvqcl
Robert Kausch wrote: > The problem seems to be that sum is interpreted as a 64 bit value if > SSE2 was used in the loop (the lower 32 bits of the result give the > expected value). If sum is evaluated another time before or after (!) > the printf, the problem goes away. For example, changing the l

Re: [flac-dev] Two questions about RG in flac

2014-06-06 Thread lvqcl
Ozkan Sezer wrote: > With gcc-3,3,6, 3,4,6, 4.3.0 and gcc-4.9.1 (svn r210839) the output is > normal: > Sum = 64.00 (should be equal to 64) > > With gcc-4.8.3 (release version) it's broken: > Sum = 206158430272.00 (should be equal to 64) > > With clang-3.4.1 (compiled with gcc-4.8.3) the o

Re: [flac-dev] Two questions about RG in flac

2014-06-03 Thread Ozkan Sezer
On 6/3/14, Robert Kausch wrote: > Am 03.06.2014 16:45, schrieb lvqcl: >> 2) to ALL: >> I attached a small program. Compile and run it. >> * Does it work correctly when compiled with -O3 -msse2 options? >> * If yes, does it work correctly when compiled with -O3 -funroll-loops >> -msse2 options? >>

Re: [flac-dev] Two questions about RG in flac

2014-06-03 Thread Robert Kausch
Am 03.06.2014 16:45, schrieb lvqcl: 2) to ALL: I attached a small program. Compile and run it. * Does it work correctly when compiled with -O3 -msse2 options? * If yes, does it work correctly when compiled with -O3 -funroll-loops -msse2 options? ( and what is the version of your GCC? ) I fur

Re: [flac-dev] Two questions about RG in flac

2014-06-03 Thread Robert Kausch
Am 03.06.2014 16:45, schrieb lvqcl: > 2) to ALL: > I attached a small program. Compile and run it. > * Does it work correctly when compiled with -O3 -msse2 options? > * If yes, does it work correctly when compiled with -O3 -funroll-loops > -msse2 options? > ( and what is the version of your GCC?