pi_samples is needed to check if the sync is followed by an other sync when the WAV file has 0 padding.