The Android documentation for SoundPool says "the application can also
alter the pitch by adjusting the playback rate in real-time for
doppler or synthesis effects". So I tried to do this, using the
setRate method to vary smoothly from one note to another, but the
result is awful: the sound variation is very ragged. Here is the code
I tried. Please tell me if there is a better way.
int streamId = soundPool.play (soundId, 1, 1, 1, 0, 1.0f);
for (float x = 0; x < 1; x += 0.005) {
SystemClock.sleep (10);
soundPool.setRate (streamId, 1 + x);
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en