[vlc-devel] [PATCH] Extend simple mixer to handle 16bit audio

XilasZ xilasz at gmail.com
Sun Sep 25 14:14:00 CEST 2011


>   Use int16_t instead of short.


Ah yes, of course.


> It's a full duplicate of the DoWork for float and can be avoiding by
> templating (move
> the function to a .h, and include it twice with 2 sets of defines).
>

I didn't know templating could be done in C, nice trick :)

But the code is not acceptable IMHO:
>  - you don't handle overflow, and so you will have broken audio.
>  - you still use float, so no performance gain
>

hmm, good point, i'm not used to those stuff, can you suggest a good way to
fix it ?


Checking the codec at every iteration is silly and easily avoided.
>

I agree, i sent the patch anyway to get feedback on the right way to do it.



> This should be a separate plug-in anyway. The code is totally useless on
> x86.
>

ok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110925/d7e46988/attachment.html>


More information about the vlc-devel mailing list