Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2021fba4 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android Git Automerger
Browse files

am d8405261: Merge "Update audio comments"

* commit 'd8405261':
  Update audio comments
parents 978efc21 d8405261
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
        recorderCallback,// callback_t
        lpCallbackData,// void* user
        0,             // notificationFrames,
        true,          // threadCanCallJava)
        true,          // threadCanCallJava
        sessionId);

    if (lpRecorder->initCheck() != NO_ERROR) {
+7 −5
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ public class AudioRecord
    private static final int AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED    = -20;

    // Events:
    // to keep in sync with frameworks/base/include/media/AudioRecord.h
    // to keep in sync with frameworks/av/include/media/AudioRecord.h
    /**
     * Event id denotes when record head has reached a previously set marker.
     */
@@ -427,10 +427,12 @@ public class AudioRecord

    /**
     * Returns the minimum buffer size required for the successful creation of an AudioRecord
     * object.
     * object, in byte units.
     * Note that this size doesn't guarantee a smooth recording under load, and higher values
     * should be chosen according to the expected frequency at which the AudioRecord instance
     * will be polled for new data.
     * See {@link #AudioRecord(int, int, int, int, int)} for more information on valid
     * configuration values.
     * @param sampleRateInHz the sample rate expressed in Hertz.
     * @param channelConfig describes the configuration of the audio channels.
     *   See {@link AudioFormat#CHANNEL_IN_MONO} and
@@ -440,10 +442,9 @@ public class AudioRecord
     * @return {@link #ERROR_BAD_VALUE} if the recording parameters are not supported by the
     *  hardware, or an invalid parameter was passed,
     *  or {@link #ERROR} if the implementation was unable to query the hardware for its
     *  output properties,
     *  input properties,
     *   or the minimum buffer size expressed in bytes.
     * @see #AudioRecord(int, int, int, int, int) for more information on valid
     *   configuration values.
     * @see #AudioRecord(int, int, int, int, int)
     */
    static public int getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat) {
        int channelCount = 0;
@@ -692,6 +693,7 @@ public class AudioRecord
     * Sets the period at which the listener is called, if set with
     * {@link #setRecordPositionUpdateListener(OnRecordPositionUpdateListener)} or
     * {@link #setRecordPositionUpdateListener(OnRecordPositionUpdateListener, Handler)}.
     * It is possible for notifications to be lost if the period is too small.
     * @param periodInFrames update period expressed in frames
     * @return error code or success, see {@link #SUCCESS}, {@link #ERROR_INVALID_OPERATION}
     */
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ public class AudioTrack
    private int mNativeBufferSizeInBytes = 0;
    private int mNativeBufferSizeInFrames = 0;
    /**
     * Handler for marker events coming from the native code.
     * Handler for events coming from the native code.
     */
    private NativeEventHandlerDelegate mEventHandlerDelegate;
    /**