Discussion:
[fluid-dev] Adding 8bit support.
Carlo Bramini
2018-11-04 13:08:04 UTC
Permalink
Hello,

I was wondering what you think and if it could be accepted the support of 8bit audio out samples.

This implementation required me to:
- add an fluid_synth_write_u8() function into src\synth\fluid_synth.c after the existing fluid_synth_write_s16() and fluid_synth_write_float(). Actually, it is identical to 16bit function, except that the samples are calculated in the range [0..255].
- add "8bits" option to the "audio.sample-format" setting.

In adddition to that, I suppose that also the documentation will need to be updated, if the "audio.sample-format" setting will support it.

Sincerely.
Tom M.
2018-11-05 14:22:14 UTC
Permalink
I guess that fluid_synth_write_s16() was introduced because it was
needed by an audio driver that was not able to cope with floats. Not
absolutely sure, fluid_synth_write_s16() is older than Initial Commit.

If we add fluid_synth_write_u8() it should be required by some audio
driver as well. If not, it would be good to see more people requiring
8bit support. I personally don't think it's common or useful enough to
be added to fluidsynth nowadays. And also because converting from
s16 to u8 it pretty straight forward for an application, I don't think
it's likely to be added, sry.

Tom
Carlo Bramini
2018-11-10 14:50:27 UTC
Permalink
I see.

Perhaps it may be useful for the file renderer, giving the chance to use 16bits or 8bits may be good to reduce the amount of data written on the disk and its latency.

Sincerely.
Post by Tom M.
I guess that fluid_synth_write_s16() was introduced because it was
needed by an audio driver that was not able to cope with floats. Not
absolutely sure, fluid_synth_write_s16() is older than Initial Commit.
If we add fluid_synth_write_u8() it should be required by some audio
driver as well. If not, it would be good to see more people requiring
8bit support. I personally don't think it's common or useful enough to
be added to fluidsynth nowadays. And also because converting from
s16 to u8 it pretty straight forward for an application, I don't think
it's likely to be added, sry.
Tom
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Loading...