diff options
author | Sean McNeil <sean.mcneil@windriver.com> | 2009-12-03 03:35:48 +0700 |
---|---|---|
committer | Sean McNeil <sean.mcneil@windriver.com> | 2009-12-03 03:35:48 +0700 |
commit | 55c0a2979d070b56b3e10bd92a9fc9aa7b174246 (patch) | |
tree | 4e6de6260f11a3107bdff4e77c2eaada9e90fcea | |
parent | b68de1db25598a54313ce4e7faf47d7af1c9c844 (diff) | |
download | alsa_sound-55c0a2979d070b56b3e10bd92a9fc9aa7b174246.tar.gz |
Write correct number of bytes per attempt.
-rw-r--r-- | AudioStreamOutALSA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AudioStreamOutALSA.cpp b/AudioStreamOutALSA.cpp index b042bfb..8d19caa 100644 --- a/AudioStreamOutALSA.cpp +++ b/AudioStreamOutALSA.cpp @@ -90,7 +90,7 @@ ssize_t AudioStreamOutALSA::write(const void *buffer, size_t bytes) do { n = snd_pcm_writei(mHandle->handle, (char *)buffer + sent, - snd_pcm_bytes_to_frames(mHandle->handle, bytes)); + snd_pcm_bytes_to_frames(mHandle->handle, bytes - sent)); if (n == -EBADFD) { // Somehow the stream is in a bad state. The driver probably // has a bug and snd_pcm_recover() doesn't seem to handle this. |