Challenge: Playback Speed Control

In this challenge, you will add playback speed control to BeatBox to greatly expand the user’s repertoire of possible sounds (Figure 20.8). Within MainActivity, wire up a SeekBar to control the rate value SoundPool’s play(Int, Float, Float, Int, Int, Float) function accepts.

Figure 20.8  BeatBox with playback speed control

BeatBox with playback speed control

To make this happen, check out the docs at​reference/​android/​widget/​SeekBar.html.

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.