From 8db958042e407e274e6ae25da8e70cb6310a2873 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 11 Jul 2014 17:43:18 +0200 Subject: [PATCH] Improved documentation of SoundStream::onGetData (#650) --- include/SFML/Audio/SoundStream.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 12102d8cb..c66daf350 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -209,6 +209,9 @@ protected : /// streaming loop, in a separate thread. /// The source can choose to stop the streaming loop at any time, by /// returning false to the caller. + /// If you return true (i.e. continue streaming) it is important that + /// the returned array of samples is not empty; this would stop the stream + /// due to an internal limitation. /// /// \param data Chunk of data to fill /// @@ -352,6 +355,7 @@ private : /// virtual bool onGetData(Chunk& data) /// { /// // Fill the chunk with audio data from the stream source +/// // (note: must not be empty if you want to continue playing) /// data.samples = ...; /// data.sampleCount = ...; ///