mp3 ファイルを右チャンネルのみで再生したい。-> 左チャンネル、設定ボリューム: 0 (ミュート)
私は試した :
public class TestSound {
private SoundPool soundPool;
private int id;
public TestSound(Context context,final float leftVolume, final float rightVolume) {
soundPool = new SoundPool(2, AudioManager.STREAM_MUSIC, 100);
id = soundPool.load(context, R.raw.cat, 1);
soundPool.setOnLoadCompleteListener(new OnLoadCompleteListener() {
public void onLoadComplete(SoundPool arg0, int arg1, int arg2) {
soundPool.play(id, leftVolume, rightVolume, 1, 0, 1f);
};
});
}
}
//execute
new TestSound(getApplicationContext(), 0f, 1.0f); //left vol:0; right:1
残念ながら、最初のチャンネル (左) : 非常に静かに曲を再生し (ミュートされていない)、2 番目のチャンネル (右) は良好です。なんで?
アンドロイド OS: 2.3.4
ご協力ありがとう御座います!