Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のアプリでは、オーディオ クリップを再生するときに音量を最大レベルに設定しようとしていますが、何の効果もないようです。音量を手動で最大レベルに調整する必要があります。これが私のコードです:
MediaPlayer mp = new MediaPlayer(); mp.setVolume(1, 1);
オーディオマネージャー
int origionalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);