Re: [LAD] (libsndfile) FLAC format question

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Tuesday, November 5, 2013 - 10:19 pm

hermann meyer wrote:

> I would save a internal audio buffer to file on exit, to reuse it after

Yes, and so it should.

> I tried it with the sf_command (sndfile, SFC_SET_NORM_FLOAT, NULL, SF_TRUE)

No, it won't.

What you need to do is scale your data to the range [-1.0, 1.0] before
you write it to the file.

> Yes, I use sf_write_float to write/read the flac file, even if flac

Yes, that is correct.

> So my quetion will be, which is the common format to write flac file

Writing float is fine, you just need to ensure that the data is in
range [-1.0, 1.0] first.

> and is there a way to write values out of range into a

No, there isn't.

Erik de Castro Lopo
Linux-audio-dev mailing list

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] (libsndfile) FLAC format question, hermann meyer, (Tue Nov 5, 7:04 pm)
Re: [LAD] (libsndfile) FLAC format question, Erik de Castro Lopo, (Tue Nov 5, 10:19 pm)
Re: [LAD] (libsndfile) FLAC format question, hermann meyer, (Wed Nov 6, 5:25 am)