I have a set of pressure data at a sampling rate of 262144 Hz for 3 seconds making it 786432 samples of pressure data. I want to plot a curve of the SPL (sound pressure level) vs frequency. I first converted pressure data to SPL using $20\log_{10}(P/P_{ref})$ and performed a 4096 point FFT for the 192 segments of data and averaged them.
However, I couldn't get the required SPL values in decibels. Was the approach correct? If not, could you please point out the mistake in my approach?