-#ifdef NO_POSIX_MEMALIGN
- _data = (Sample *) malloc(sizeof(Sample) * _capacity);
-#else
- if (posix_memalign((void**)&_data, CPU_CACHE_ALIGN, sizeof(Sample) * _capacity)) {
- fatal << string_compose (_("Memory allocation error: posix_memalign (%1 * %2) failed (%3)"),
- CPU_CACHE_ALIGN, sizeof (Sample) * _capacity, strerror (errno)) << endmsg;
+bool
+AudioBuffer::check_silence (pframes_t nframes, pframes_t& n) const
+{
+ for (n = 0; n < nframes; ++n) {
+ if (_data[n] != Sample (0)) {
+ return false;
+ }