k = (size_t) n * pa_frame_size(ss);
- if (k >= hwbuf_size * 5 ||
- k >= pa_bytes_per_second(ss)*10) {
+ if (PA_UNLIKELY(k >= hwbuf_size * 5 ||
+ k >= pa_bytes_per_second(ss)*10)) {
PA_ONCE_BEGIN {
char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
abs_k = k >= 0 ? (size_t) k : (size_t) -k;
- if (abs_k >= hwbuf_size * 5 ||
- abs_k >= pa_bytes_per_second(ss)*10) {
+ if (PA_UNLIKELY(abs_k >= hwbuf_size * 5 ||
+ abs_k >= pa_bytes_per_second(ss)*10)) {
PA_ONCE_BEGIN {
char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
if (capture) {
abs_k = (size_t) avail * pa_frame_size(ss);
- if (abs_k >= hwbuf_size * 5 ||
- abs_k >= pa_bytes_per_second(ss)*10) {
+ if (PA_UNLIKELY(abs_k >= hwbuf_size * 5 ||
+ abs_k >= pa_bytes_per_second(ss)*10)) {
PA_ONCE_BEGIN {
char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
avail = (snd_pcm_sframes_t) (hwbuf_size / pa_frame_size(ss));
}
- if (*delay < avail) {
+ if (PA_UNLIKELY(*delay < avail)) {
PA_ONCE_BEGIN {
char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
pa_log(_("snd_pcm_avail_delay() returned strange values: delay %lu is less than avail %lu.\n"
k = (size_t) *frames * pa_frame_size(ss);
- if (*frames > before ||
- k >= hwbuf_size * 3 ||
- k >= pa_bytes_per_second(ss)*10)
-
+ if (PA_UNLIKELY(*frames > before ||
+ k >= hwbuf_size * 3 ||
+ k >= pa_bytes_per_second(ss)*10))
PA_ONCE_BEGIN {
char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
pa_log(_("snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes (%lu ms).\n"