fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] Changes checked into CVS


From: Josh Green
Subject: [fluid-dev] Changes checked into CVS
Date: Tue, 21 Nov 2006 21:36:16 +0000

I just checked in some changes into CVS.

Including:
- Dithering now performed for 16 bit output (thanks to Zenkov Mihail)
- Bug fix to 100% CPU consumption problem with "default" ALSA device
- Some minor bug fixes to ALSA sequencer code
- Other minor stuff not worth mentioning


Some info/questions for Zenkov Mihail concerning the dithering:

I modified your patch a bit for several reasons and I wanted to check
with you to make sure I didn't break something in the process.

A variable "dither_index" was added to the fluid_synth_t structure, so
that the dithering buffer index is per synth instead of a static var in
a function (would be a problem if multiple synths were running).

- I re-enabled the call to dev->callback in fluid_alsa_audio_run_s16
since this is part of the API (don't want to break it if someone is
using it)

- A new function fluid_synth_dither_s16() is now used to do the float to
16 bit conversion (with dithering) in fluid_alsa_audio_run_s16, this
function is not part of the public API

- The test for the dither index wrap around was (if nr > DITHER_SIZE),
which I think should be (if nr >= DITHER_SIZE)

- I removed the roundf calls since they seem to require a special
-std=c99 compiler switch, which makes me doubt it works in Windows.
Instead the float sample is just multiplied by 32767.0 and
rand_table[0][di] is added and then the value gets clipped to the range
-32768 - 32767 and finally the value is integer truncated when it gets
assigned to the 16 bit value.  Hopefully that is OK?


I must admit, I had trouble hearing the difference between the new
changes and the old.  There does seem to be something different, but I
can't quite point it out.  Perhaps I don't have very good musically
trained ears ;)  Then again, perhaps I broke something when making
changes to your patch, although I did also test your patch directly.

I did discover another bug in the process.  There seems to be a rather
explosive audio problem with some instruments played at very high notes.
I suspect a filter issue (there were several similar issues in the
past).  Not sure at this point how to fix it though.

Thanks again for the contribution.  Cheers!
        Josh Green






reply via email to

[Prev in Thread] Current Thread [Next in Thread]