summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@gmx.de>2008-12-03 16:38:12 +0100
committerChristoph Egger <Christoph.Egger@gmx.de>2008-12-03 16:38:12 +0100
commit69f4b1b3ecbe4c00508c85eaf2e88aeba5e4232f (patch)
tree6d3d19198fb2aa6c638a67c83a6444dec2adb745 /include
parent58905d98572ab7078eda45bbb50fd1cbf900e7d2 (diff)
Imported Upstream version 1.4~svn944
Diffstat (limited to 'include')
-rw-r--r--include/SFML/Audio/SoundBufferRecorder.hpp18
-rw-r--r--include/SFML/Audio/SoundRecorder.hpp30
-rw-r--r--include/SFML/Network/Ftp.hpp6
3 files changed, 33 insertions, 21 deletions
diff --git a/include/SFML/Audio/SoundBufferRecorder.hpp b/include/SFML/Audio/SoundBufferRecorder.hpp
index d70628a..1629f3b 100644
--- a/include/SFML/Audio/SoundBufferRecorder.hpp
+++ b/include/SFML/Audio/SoundBufferRecorder.hpp
@@ -49,15 +49,27 @@ public :
/// \return Constant reference to the sound buffer
///
////////////////////////////////////////////////////////////
- const SoundBuffer& GetBuffer();
+ const SoundBuffer& GetBuffer() const;
private :
////////////////////////////////////////////////////////////
- /// /see SoundBuffer::ProcessSamples
+ /// /see SoundBuffer::OnStart
///
////////////////////////////////////////////////////////////
- virtual bool ProcessSamples(const Int16* Samples, std::size_t SamplesCount);
+ virtual bool OnStart();
+
+ ////////////////////////////////////////////////////////////
+ /// /see SoundBuffer::OnProcessSamples
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool OnProcessSamples(const Int16* Samples, std::size_t SamplesCount);
+
+ ////////////////////////////////////////////////////////////
+ /// /see SoundBuffer::OnStop
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void OnStop();
////////////////////////////////////////////////////////////
// Member data
diff --git a/include/SFML/Audio/SoundRecorder.hpp b/include/SFML/Audio/SoundRecorder.hpp
index 9f4767e..f62d9c3 100644
--- a/include/SFML/Audio/SoundRecorder.hpp
+++ b/include/SFML/Audio/SoundRecorder.hpp
@@ -42,18 +42,6 @@ class SFML_API SoundRecorder : private Thread
{
public :
- typedef bool (*FuncType)(const Int16*, std::size_t, void*);
-
- ////////////////////////////////////////////////////////////
- /// Construct the sound recorder with a callback function
- /// for processing captured samples
- ///
- /// \param Callback : Callback for processing captured samples
- /// \param UserData : Data to pass to the callback function (NULL by default)
- ///
- ////////////////////////////////////////////////////////////
- SoundRecorder(FuncType Callback, void* UserData = NULL);
-
////////////////////////////////////////////////////////////
/// Virtual destructor
///
@@ -104,6 +92,14 @@ protected :
private :
////////////////////////////////////////////////////////////
+ /// Start recording audio data
+ ///
+ /// \return False to abort recording audio data, true to start
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool OnStart();
+
+ ////////////////////////////////////////////////////////////
/// Process a new chunk of recorded samples
///
/// \param Samples : Pointer to the new chunk of recorded samples
@@ -112,7 +108,13 @@ private :
/// \return False to stop recording audio data, true to continue
///
////////////////////////////////////////////////////////////
- virtual bool ProcessSamples(const Int16* Samples, std::size_t SamplesCount);
+ virtual bool OnProcessSamples(const Int16* Samples, std::size_t SamplesCount) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Stop recording audio data
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void OnStop();
////////////////////////////////////////////////////////////
/// /see Thread::Run
@@ -135,8 +137,6 @@ private :
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
- FuncType myCallback; ///< Callback for processing captured samples
- void* myUserData; ///< User data to pass to the processing callback
std::vector<Int16> mySamples; ///< Buffer to store captured samples
unsigned int mySampleRate; ///< Sample rate
bool myIsCapturing; ///< Capturing state
diff --git a/include/SFML/Network/Ftp.hpp b/include/SFML/Network/Ftp.hpp
index d4bb439..673b904 100644
--- a/include/SFML/Network/Ftp.hpp
+++ b/include/SFML/Network/Ftp.hpp
@@ -63,7 +63,7 @@ public :
/// - a status code
/// - a message
////////////////////////////////////////////////////////////
- class Response
+ class SFML_API Response
{
public :
@@ -179,7 +179,7 @@ public :
////////////////////////////////////////////////////////////
/// Specialization of FTP response returning a directory
////////////////////////////////////////////////////////////
- class DirectoryResponse : public Response
+ class SFML_API DirectoryResponse : public Response
{
public :
@@ -211,7 +211,7 @@ public :
////////////////////////////////////////////////////////////
/// Specialization of FTP response returning a filename lisiting
////////////////////////////////////////////////////////////
- class ListingResponse : public Response
+ class SFML_API ListingResponse : public Response
{
public :