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

Commit 21139df1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow non pcm formats for setBufferSizeInFrames"

parents e43c009e 5362a14b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1275,10 +1275,6 @@ ssize_t AudioTrack::setBufferSizeInFrames(size_t bufferSizeInFrames)
    if (mOutput == AUDIO_IO_HANDLE_NONE || mProxy.get() == 0) {
        return NO_INIT;
    }
    // Reject if timed track or compressed audio.
    if (!audio_is_linear_pcm(mFormat)) {
        return INVALID_OPERATION;
    }

    ssize_t originalBufferSize = mProxy->getBufferSizeInFrames();
    ssize_t finalBufferSize  = mProxy->setBufferSizeInFrames((uint32_t) bufferSizeInFrames);
+1 −2
Original line number Diff line number Diff line
@@ -427,8 +427,7 @@ public:
     * less than or equal to the getBufferCapacityInFrames().
     * It may also be adjusted slightly for internal reasons.
     *
     * Return the final size or a negative error if the track is unitialized
     * or does not support variable sizes.
     * Return the final size or a negative value (NO_INIT) if the track is uninitialized.
     */
            ssize_t     setBufferSizeInFrames(size_t size);