mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fix SoundRecorder example code
This commit is contained in:
parent
b5be18cd8d
commit
3acd9620eb
@ -359,12 +359,14 @@ private:
|
|||||||
/// \code
|
/// \code
|
||||||
/// class CustomRecorder : public sf::SoundRecorder
|
/// class CustomRecorder : public sf::SoundRecorder
|
||||||
/// {
|
/// {
|
||||||
|
/// public:
|
||||||
/// ~CustomRecorder()
|
/// ~CustomRecorder()
|
||||||
/// {
|
/// {
|
||||||
/// // Make sure to stop the recording thread
|
/// // Make sure to stop the recording thread
|
||||||
/// stop();
|
/// stop();
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
|
/// private:
|
||||||
/// virtual bool onStart() // optional
|
/// virtual bool onStart() // optional
|
||||||
/// {
|
/// {
|
||||||
/// // Initialize whatever has to be done before the capture starts
|
/// // Initialize whatever has to be done before the capture starts
|
||||||
@ -374,7 +376,7 @@ private:
|
|||||||
/// return true;
|
/// return true;
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount)
|
/// virtual bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount)
|
||||||
/// {
|
/// {
|
||||||
/// // Do something with the new chunk of samples (store them, send them, ...)
|
/// // Do something with the new chunk of samples (store them, send them, ...)
|
||||||
/// ...
|
/// ...
|
||||||
@ -388,7 +390,7 @@ private:
|
|||||||
/// // Clean up whatever has to be done after the capture ends
|
/// // Clean up whatever has to be done after the capture ends
|
||||||
/// ...
|
/// ...
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// };
|
||||||
///
|
///
|
||||||
/// // Usage
|
/// // Usage
|
||||||
/// if (CustomRecorder::isAvailable())
|
/// if (CustomRecorder::isAvailable())
|
||||||
|
Loading…
Reference in New Issue
Block a user