-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)
你的問題還不清楚。您是否嘗試僅播放連接的耳機的一個通道(左側或右側)?如果是這樣,你用什麼來播放音效? – kcoppock
你已經明白了!我想把「嘟嘟」的聲音播放到正確的耳機,但不是左側,或者將耳機的聲音播放到左側,但不是右側。 我需要這個,因爲我的申請的目的是驗證聽力耳聾的程度。謝謝,我希望我已經說清楚了。 – user3606031