Improved documentation of SoundStream::onGetData (#650)

This commit is contained in:
Laurent Gomila 2014-07-11 17:43:18 +02:00
parent 471873dff9
commit 8db958042e

View File

@ -209,6 +209,9 @@ protected :
/// streaming loop, in a separate thread. /// streaming loop, in a separate thread.
/// The source can choose to stop the streaming loop at any time, by /// The source can choose to stop the streaming loop at any time, by
/// returning false to the caller. /// 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 /// \param data Chunk of data to fill
/// ///
@ -352,6 +355,7 @@ private :
/// virtual bool onGetData(Chunk& data) /// virtual bool onGetData(Chunk& data)
/// { /// {
/// // Fill the chunk with audio data from the stream source /// // Fill the chunk with audio data from the stream source
/// // (note: must not be empty if you want to continue playing)
/// data.samples = ...; /// data.samples = ...;
/// data.sampleCount = ...; /// data.sampleCount = ...;
/// ///