Loading media/java/android/media/AudioTrack.java +19 −24 Original line number Diff line number Diff line Loading @@ -1052,16 +1052,13 @@ public class AudioTrack implements AudioRouting } } // TODO Change getBufferCapacityInFrames() reference below to // {@link #getBufferCapacityInFrames()} after @hide is removed. // TODO Change setBufferSizeInFrames(int) reference below to // {@link #setBufferSizeInFrames(int)} after @hide is removed. /** * Returns the effective size of the <code>AudioTrack</code> buffer * that the application writes to. * <p> This will be less than or equal to the result of * getBufferCapacityInFrames(). * It will be equal if setBufferSizeInFrames(int) has never been called. * {@link #getBufferCapacityInFrames()}. * It will be equal if {@link #setBufferSizeInFrames(int)} has never been called. * <p> If the track is subsequently routed to a different output sink, the buffer * size and capacity may enlarge to accommodate. * <p> If the <code>AudioTrack</code> encoding indicates compressed data, Loading @@ -1076,8 +1073,6 @@ public class AudioTrack implements AudioRouting return native_get_buffer_size_frames(); } // TODO Change getBufferCapacityInFrames() reference below to // {@link #getBufferCapacityInFrames()} after @hide is removed. /** * Limits the effective size of the <code>AudioTrack</code> buffer * that the application writes to. Loading @@ -1089,7 +1084,7 @@ public class AudioTrack implements AudioRouting * but there may be more glitches due to buffer underruns. * <p>The actual size used may not be equal to this requested size. * It will be limited to a valid range with a maximum of * getBufferCapacityInFrames(). * {@link #getBufferCapacityInFrames()}. * It may also be adjusted slightly for internal reasons. * If bufferSizeInFrames is less than zero then {@link #ERROR_BAD_VALUE} * will be returned. Loading @@ -1097,8 +1092,8 @@ public class AudioTrack implements AudioRouting * It is not supported for compressed audio tracks. * * @param bufferSizeInFrames requested buffer size * @return error code or success, see {@link #SUCCESS}, {@link #ERROR_BAD_VALUE}, * {@link #ERROR_INVALID_OPERATION} * @return the actual buffer size in frames or an error code, * {@link #ERROR_BAD_VALUE}, {@link #ERROR_INVALID_OPERATION} * @throws IllegalStateException */ public int setBufferSizeInFrames(int bufferSizeInFrames) { Loading Loading
media/java/android/media/AudioTrack.java +19 −24 Original line number Diff line number Diff line Loading @@ -1052,16 +1052,13 @@ public class AudioTrack implements AudioRouting } } // TODO Change getBufferCapacityInFrames() reference below to // {@link #getBufferCapacityInFrames()} after @hide is removed. // TODO Change setBufferSizeInFrames(int) reference below to // {@link #setBufferSizeInFrames(int)} after @hide is removed. /** * Returns the effective size of the <code>AudioTrack</code> buffer * that the application writes to. * <p> This will be less than or equal to the result of * getBufferCapacityInFrames(). * It will be equal if setBufferSizeInFrames(int) has never been called. * {@link #getBufferCapacityInFrames()}. * It will be equal if {@link #setBufferSizeInFrames(int)} has never been called. * <p> If the track is subsequently routed to a different output sink, the buffer * size and capacity may enlarge to accommodate. * <p> If the <code>AudioTrack</code> encoding indicates compressed data, Loading @@ -1076,8 +1073,6 @@ public class AudioTrack implements AudioRouting return native_get_buffer_size_frames(); } // TODO Change getBufferCapacityInFrames() reference below to // {@link #getBufferCapacityInFrames()} after @hide is removed. /** * Limits the effective size of the <code>AudioTrack</code> buffer * that the application writes to. Loading @@ -1089,7 +1084,7 @@ public class AudioTrack implements AudioRouting * but there may be more glitches due to buffer underruns. * <p>The actual size used may not be equal to this requested size. * It will be limited to a valid range with a maximum of * getBufferCapacityInFrames(). * {@link #getBufferCapacityInFrames()}. * It may also be adjusted slightly for internal reasons. * If bufferSizeInFrames is less than zero then {@link #ERROR_BAD_VALUE} * will be returned. Loading @@ -1097,8 +1092,8 @@ public class AudioTrack implements AudioRouting * It is not supported for compressed audio tracks. * * @param bufferSizeInFrames requested buffer size * @return error code or success, see {@link #SUCCESS}, {@link #ERROR_BAD_VALUE}, * {@link #ERROR_INVALID_OPERATION} * @return the actual buffer size in frames or an error code, * {@link #ERROR_BAD_VALUE}, {@link #ERROR_INVALID_OPERATION} * @throws IllegalStateException */ public int setBufferSizeInFrames(int bufferSizeInFrames) { Loading