This makes some subsequent feeder refactors easier to implement.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential D48421
sound: Turn PCM_CLAMP_* macros into a function christos on Fri, Jan 10, 6:36 PM. Authored by Tags None Referenced Files
Subscribers
Details
This makes some subsequent feeder refactors easier to implement. Sponsored by: The FreeBSD Foundation
Diff Detail
Event Timeline
Comment Actions This currently shifts 32bit samples out of the 32bit range in case SND_PCM_64 is not set. sample << PCM_FXSHIFT happens twice. The root cause is in D47932 though.
Comment Actions I have a proposal to simplify this code, may be worth considering. The general idea would be to
For the mixer this just takes a bit more logic on 32bit architectures, and for the volume multiplying a 16bit sample with a 16bit volume would now be two multiplication ops. On the positive side, we can always maintain the full 32bit resolution, and get rid of the whole *_calc() sample handling. Does that make sense?
|