Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include "SFML\Audio.hpp"
  2. #include <iostream>
  3. class MyRecorder : public sf::SoundRecorder{
  4. public:
  5.     virtual bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount){
  6.         std::cout << "called with " << sampleCount << " samples" << std::endl;
  7.         return false;
  8.     }
  9. };
  10.  
  11. int main(){
  12.     MyRecorder r;
  13.     r.start();
  14.     sf::sleep(sf::milliseconds(5000));
  15.     r.stop();
  16.     sf::sleep(sf::milliseconds(5000));
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement