Print the FillBuffer() error when running out of buffers only once.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38437 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010, Axel Dörfler, [email protected].
|
||||
* Copyright 2000-2010, Stephan Aßmus <[email protected]>,
|
||||
* Copyright 2000-2008, Ingo Weinhold <[email protected]>,
|
||||
* All Rights Reserved. Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Copyright (c) 1998-99, Be Incorporated, All Rights Reserved.
|
||||
* Distributed under the terms of the Be Sample Code license.
|
||||
*
|
||||
* Copyright 2010, Axel Dörfler, [email protected].
|
||||
* Copyright 2000-2008, Ingo Weinhold <[email protected]>,
|
||||
* Copyright 2000-2008, Stephan Aßmus <[email protected]>,
|
||||
* All Rights Reserved. Distributed under the terms of the MIT license.
|
||||
*/
|
||||
|
||||
|
||||
@@ -808,8 +808,14 @@ AudioProducer::_FillNextBuffer(bigtime_t eventTime)
|
||||
BBuffer* buffer = fBufferGroup->RequestBuffer(
|
||||
fOutput.format.u.raw_audio.buffer_size, BufferDuration());
|
||||
|
||||
if (!buffer) {
|
||||
ERROR("AudioProducer::_FillNextBuffer() - no buffer\n");
|
||||
if (buffer == NULL) {
|
||||
static bool errorPrinted = false;
|
||||
if (!errorPrinted) {
|
||||
ERROR("AudioProducer::_FillNextBuffer() - no buffer "
|
||||
"(size: %ld, duration: %lld)\n",
|
||||
fOutput.format.u.raw_audio.buffer_size, BufferDuration());
|
||||
errorPrinted = true;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user