Update compile flags.
Fix sample format search algorithm.