Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c896346 authored by Glenn Kasten's avatar Glenn Kasten Committed by android-build-merger
Browse files

Merge "Don't create empty .wav files" into pi-dev

am: cdcfb309

Change-Id: If1e4197bb8703985dbff32079bbe504797ef1c3e
parents 691dafdc cdcfb309
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -3490,9 +3490,14 @@ void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_hand
            // FIXME not big-endian safe
            write(teeFd, &temp, sizeof(temp));
            close(teeFd);
            // TODO Should create file with temporary name and then rename to final if non-empty.
            if (total > 0) {
                if (fd >= 0) {
                    dprintf(fd, "tee copied to %s\n", teePath);
                }
            } else {
                unlink(teePath);
            }
        } else {
            if (fd >= 0) {
                dprintf(fd, "unable to create tee %s: %s\n", teePath, strerror(errno));