Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-02-09 19:23:17 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-02-09 19:23:17 +0400
commitcd1a95f55aba06920392b0d0dd4230ebce71c173 (patch)
treeca0b2b68979796d0972a5cdd66d8c50031359ff9 /winsup/cygwin/fhandler_dsp.cc
parent9eba4de2699e6365c45f3a48a011038f4eb6df3c (diff)
* fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::write): Set
bytes_to_write to 0 in case it fits into the buffer, otherwise suffer early EOF in caller.
Diffstat (limited to 'winsup/cygwin/fhandler_dsp.cc')
-rw-r--r--winsup/cygwin/fhandler_dsp.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
index de2169eed..1cb3b465e 100644
--- a/winsup/cygwin/fhandler_dsp.cc
+++ b/winsup/cygwin/fhandler_dsp.cc
@@ -1,6 +1,6 @@
/* fhandler_dev_dsp: code to emulate OSS sound model /dev/dsp
- Copyright 2001, 2002, 2003, 2004, 2008, 2011 Red Hat, Inc
+ Copyright 2001, 2002, 2003, 2004, 2008, 2011, 2012 Red Hat, Inc
Written by Andy Younger (andy@snoogie.demon.co.uk)
Extended by Gerd Spalink (Gerd.Spalink@t-online.de)
@@ -478,6 +478,7 @@ fhandler_dev_dsp::Audio_out::write (const char *pSampleData, int nBytes)
{ // all data fits into the current block, with some space left
memcpy (&pHdr_->lpData[bufferIndex_], pSampleData, bytes_to_write);
bufferIndex_ += bytes_to_write;
+ bytes_to_write = 0;
break;
}
else