-1

如何仅选择左或右帽,然后将选定的声音播放到耳机?

4

1 回答 1

1

假设SoundPool没问题,您可以使用:

SoundPool pool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 0);
pool.play(
        pool.load(this, R.raw.my_sound_effect, 1), // The sound effect to play
        0, // The volume for the left channel (0.0 - 1.0)
        1.0f, // The volume for the right channel (0.0 - 1.0)
        0, // Default priority 
        0, // Do not loop
        1.0f); // Playback rate (1.0f == normal)
于 2014-05-06T00:02:51.043 回答