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 developer.android.com/​reference/​android/​widget/​SeekBar.html.

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.