21 lines
450 B
C++
21 lines
450 B
C++
#ifndef MICRECORDER_H
|
|
#define MICRECORDER_H
|
|
|
|
#include <SFML/Audio.hpp>
|
|
|
|
class Player;
|
|
|
|
class MicRecorder : public sf::SoundRecorder {
|
|
public:
|
|
explicit MicRecorder(Player* owner);
|
|
|
|
protected:
|
|
bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount) override;
|
|
|
|
private:
|
|
Player* m_owner{nullptr}; //!< Владелец, в очередь которого передаются захваченные сэмплы.
|
|
};
|
|
|
|
|
|
#endif
|