Loading media/java/android/media/AudioService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3178,7 +3178,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished { mediaPlayer.setDataSource(filePath); mediaPlayer.setAudioStreamType(AudioSystem.STREAM_SYSTEM); mediaPlayer.prepare(); mediaPlayer.setVolume(volFloat, volFloat); mediaPlayer.setVolume(volFloat); mediaPlayer.setOnCompletionListener(new OnCompletionListener() { public void onCompletion(MediaPlayer mp) { cleanupPlayer(mp); Loading media/java/android/media/AudioTrack.java +9 −0 Original line number Diff line number Diff line Loading @@ -778,6 +778,15 @@ public class AudioTrack } /** * Similar, except set volume of all channels to same value. * @hide */ public int setVolume(float volume) { return setStereoVolume(volume, volume); } /** * Sets the playback sample rate for this track. This sets the sampling rate at which * the audio data will be consumed and played back, not the original sampling rate of the Loading media/java/android/media/MediaPlayer.java +14 −1 Original line number Diff line number Diff line Loading @@ -1361,14 +1361,27 @@ public class MediaPlayer * within an application. Unless you are writing an application to * control user settings, this API should be used in preference to * {@link AudioManager#setStreamVolume(int, int, int)} which sets the volume of ALL streams of * a particular type. Note that the passed volume values are raw scalars. * a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0. * UI controls should be scaled logarithmically. * * @param leftVolume left volume scalar * @param rightVolume right volume scalar */ /* * FIXME: Merge this into javadoc comment above when setVolume(float) is not @hide. * The single parameter form below is preferred if the channel volumes don't need * to be set independently. */ public native void setVolume(float leftVolume, float rightVolume); /** * Similar, excepts sets volume of all channels to same value. * @hide */ public void setVolume(float volume) { setVolume(volume, volume); } /** * Currently not implemented, returns null. * @deprecated Loading media/java/android/media/SoundPool.java +8 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,14 @@ public class SoundPool public native final void setVolume(int streamID, float leftVolume, float rightVolume); /** * Similar, except set volume of all channels to same value. * @hide */ public void setVolume(int streamID, float volume) { setVolume(streamID, volume, volume); } /** * Change stream priority. * Loading Loading
media/java/android/media/AudioService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3178,7 +3178,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished { mediaPlayer.setDataSource(filePath); mediaPlayer.setAudioStreamType(AudioSystem.STREAM_SYSTEM); mediaPlayer.prepare(); mediaPlayer.setVolume(volFloat, volFloat); mediaPlayer.setVolume(volFloat); mediaPlayer.setOnCompletionListener(new OnCompletionListener() { public void onCompletion(MediaPlayer mp) { cleanupPlayer(mp); Loading
media/java/android/media/AudioTrack.java +9 −0 Original line number Diff line number Diff line Loading @@ -778,6 +778,15 @@ public class AudioTrack } /** * Similar, except set volume of all channels to same value. * @hide */ public int setVolume(float volume) { return setStereoVolume(volume, volume); } /** * Sets the playback sample rate for this track. This sets the sampling rate at which * the audio data will be consumed and played back, not the original sampling rate of the Loading
media/java/android/media/MediaPlayer.java +14 −1 Original line number Diff line number Diff line Loading @@ -1361,14 +1361,27 @@ public class MediaPlayer * within an application. Unless you are writing an application to * control user settings, this API should be used in preference to * {@link AudioManager#setStreamVolume(int, int, int)} which sets the volume of ALL streams of * a particular type. Note that the passed volume values are raw scalars. * a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0. * UI controls should be scaled logarithmically. * * @param leftVolume left volume scalar * @param rightVolume right volume scalar */ /* * FIXME: Merge this into javadoc comment above when setVolume(float) is not @hide. * The single parameter form below is preferred if the channel volumes don't need * to be set independently. */ public native void setVolume(float leftVolume, float rightVolume); /** * Similar, excepts sets volume of all channels to same value. * @hide */ public void setVolume(float volume) { setVolume(volume, volume); } /** * Currently not implemented, returns null. * @deprecated Loading
media/java/android/media/SoundPool.java +8 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,14 @@ public class SoundPool public native final void setVolume(int streamID, float leftVolume, float rightVolume); /** * Similar, except set volume of all channels to same value. * @hide */ public void setVolume(int streamID, float volume) { setVolume(streamID, volume, volume); } /** * Change stream priority. * Loading