commit: resampler: Move some peak resampler asserts around

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

 



On Thu, 2011-12-22 at 09:49 +0530, Arun Raghavan wrote:
> Again, I disagree. If code needs documentation, it should be documented.
> Relegating that to an assert is incorrect.

You could add a comment in the else branch saying that "format is here
always PA_SAMPLE_FLOAT32NE", but that's just an assertion translated
into English. The nice thing about using pa_assert instead of a comment
is that if the assertion ever crashes, the reason will be obvious. A bug
caused by violating a rule that is stated only in a comment may not be
as easy to track down.

I'm here with Maarten: assertions are documentation.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux