Getting frequences from surrandings

  alsa, c++, fft, raspberry-pi, signal-processing

I am writing a C++ project in which I want to get frequences from surrandings. It is based on Raspberry Pi. I run some code using Alsa to record sound to .pcm. I am stuck in getting data which I have to put in FFT function.
My idea was to collect data: `snd_pcm_readi (capture_handle, buffer, buffer_frames);`
And then from buffer I wanted to get numbers for calculations. Unfortunately when I try to do it I got blank space when executing: `coutRecording code works because when I play pcm file sound is recorded correctly.
Did I make any mistake? Maybe there is any simplier solution for that case?

All the best for new year!

Source: Windows Questions C++