I wanted to record and pass through the recorded sound to the phone\'s speaker, but I could not get the recording code to work (app crashes, SEE MY ATTEMPT HERE) so I am now
Yes, you can do audio related work on emulator.
Your code sequence should be -
mp1 = new MediaPlayer();
mp1.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp1.setDataSource(PATH_TO_FILE);
mp1.prepare();
mp1.start();
And for setting permissions in the manifest file.
Use these for record feature-
and these for playing feature -
There is a guide article on official android developer website
Guide to audio capture and Guide to media playback
and if it dosn't work, then post your log cat screenshot.