Put audio recording, rms calculation, and decibel calculation in an AsyncTask