Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void playSound() {
- audioAttributes = new AudioAttributes.Builder()
- .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
- .setUsage(AudioAttributes.USAGE_MEDIA)
- .build();
- sp = new SoundPool.Builder().build();
- int soundId = sp.load(getApplicationContext(), R.raw.errorsound, 1);
- sp.play(soundId, 1, 1, 1, 1, 1f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement