我怎样才能意识到它?VideoView 工作正常,但 soundPool 没有声音。
soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100);
soundsMap = new HashMap<Integer, Integer>();
soundsMap.put(SOUND1, soundPool.load(this, R.raw.water1, 1));
soundsMap.put(SOUND2, soundPool.load(this, R.raw.water2, 1));
AudioManager mgr = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
float streamVolumeCurrent = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
float streamVolumeMax = mgr.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
float volume = streamVolumeCurrent / streamVolumeMax;
soundPool.play(SOUND1, volume, volume, 1, 0, 1);
.
.
.
VideoView.start();