0
MP3 채널 만 올바른 채널로 재생하고 싶습니다. -> 왼쪽 채널, 볼륨 세트 : 0 (음소거)Android SoundPool 왼쪽/오른쪽 볼륨
내가 시도 :
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
불행하게도, 첫 번째 채널 (왼쪽) : 아주 - 아주 조용히 (음소거되지 않음) 노래를 재생하고, 두 번째 채널 (오른쪽) 좋다. 왜?
Android OS : 2.3.4
감사합니다.