Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kobilica

Pages: [1]
1
Audio / SFML 2 sf::SoundRecorder
« on: December 22, 2011, 11:06:23 pm »
Hello, this code:

Code: [Select]

class Recorder : public sf::SoundRecorder
{

    virtual bool OnProcessSamples(const sf::Int16* Samples, std::size_t SamplesCount)
    {
        cout << *(Samples+1000) << "\n";
        return true;
    }

};


Outputs me (from console) this kind of numbers:

Code: [Select]

0
-6
4
1
-8
-4
0
9
-2
7
-3
-3
2
-8
-5
-2
5
6
-4
-2
-7
-1
6
2
-15
-8
-4
-2
-2
2
-1
2
-1
-1
0
3
-5
-3


no matter what, if audio is playing or not, numbers are same.

I have X-FI, and I use "What u hear" as a recording input.

Now, what I want to know, does SFML always records from default audio device, and always records from microphone?

Hint, I want to make realtime audio visualizator.

Pages: [1]