I do not quite understand why there is a delay between the button click and sound.
Following is my code
button = (Button) findViewById(R.id.playBtn);
I think you should consider using SoundPool instead.
SoundPool soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 100);
HashMap<Integer, Integer> soundPoolMap soundPoolMap = new HashMap<Integer, Integer>();
soundPoolMap.put(soundID, soundPool.load(this, R.raw.your_sound, 1));
And then you can play the sound using:
soundPool.play(soundId, 1, 1, 1, 0, 0);