New API for sf::Thread (more flexible)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1685 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
7ebf2f1bbb
commit
e73d274d86
8 changed files with 263 additions and 105 deletions
|
@ -38,7 +38,7 @@ namespace sf
|
|||
/// \brief Abstract base class for capturing sound data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API SoundRecorder : private Thread
|
||||
class SFML_API SoundRecorder
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -157,7 +157,7 @@ private :
|
|||
/// only when the capture is stopped.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual void Run();
|
||||
void Record();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the new available audio samples and process them
|
||||
|
@ -180,6 +180,7 @@ private :
|
|||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
Thread myThread; ///< Thread running the background recording task
|
||||
std::vector<Int16> mySamples; ///< Buffer to store captured samples
|
||||
unsigned int mySampleRate; ///< Sample rate
|
||||
bool myIsCapturing; ///< Capturing state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue