alsa mmap debugging
Adrian Smith
10 years ago
955 | 955 | |
956 | 956 | if (alsa.mmap) { |
957 | 957 | |
958 | snd_pcm_avail_update(pcmp); | |
959 | ||
958 | 960 | if ((err = snd_pcm_mmap_begin(pcmp, &areas, &offset, &alsa_frames)) < 0) { |
959 | 961 | LOG_WARN("error from mmap_begin: %s", snd_strerror(err)); |
960 | 962 | break; |
961 | 963 | } |
962 | 964 | |
963 | 965 | out_frames = (frames_t)alsa_frames; |
966 | ||
967 | // temp for debugging mmap issues | |
968 | if ((areas[0].first + offset * areas[0].step) % 8 != 0) { | |
969 | LOG_ERROR("Error: mmap offset not multiple of 8!"); | |
970 | } | |
964 | 971 | } |
965 | 972 | |
966 | 973 | // perform crossfade buffer copying here as we do not know the actual out_frames value until here |