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

Commit 665470b3 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio: deprecate audio_stream_frame_size()

Bug: 15000850.
Change-Id: I955a6efa620b8f70fa5193c7853cbe88e879c9c3
parent 5ba4440c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public:
    static status_t getSamplingRate(audio_io_handle_t output,
                                          uint32_t* samplingRate);
    // returns the number of frames per audio HAL write buffer. Corresponds to
    // audio_stream->get_buffer_size()/audio_stream_frame_size()
    // audio_stream->get_buffer_size()/audio_stream_out_frame_size()
    static status_t getFrameCount(audio_io_handle_t output,
                                  size_t* frameCount);
    // returns the audio output stream latency in ms. Corresponds to
+3 −3
Original line number Diff line number Diff line
@@ -1815,7 +1815,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l()
        LOG_FATAL("HAL format %#x not supported for mixed output",
                mFormat);
    }
    mFrameSize = audio_stream_frame_size(&mOutput->stream->common);
    mFrameSize = audio_stream_out_frame_size(mOutput->stream);
    mBufferSize = mOutput->stream->common.get_buffer_size(&mOutput->stream->common);
    mFrameCount = mBufferSize / mFrameSize;
    if (mFrameCount & 15) {
@@ -4466,7 +4466,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
                    size_t audioHALFrames =
                            (mOutput->stream->get_latency(mOutput->stream)*mSampleRate) / 1000;
                    size_t framesWritten =
                            mBytesWritten / audio_stream_frame_size(&mOutput->stream->common);
                            mBytesWritten / audio_stream_out_frame_size(mOutput->stream);
                    track->presentationComplete(framesWritten, audioHALFrames);
                    track->reset();
                    tracksToRemove->add(track);
@@ -6011,7 +6011,7 @@ void AudioFlinger::RecordThread::readInputParameters_l()
    if (mFormat != AUDIO_FORMAT_PCM_16_BIT) {
        ALOGE("HAL format %#x not supported; must be AUDIO_FORMAT_PCM_16_BIT", mFormat);
    }
    mFrameSize = audio_stream_frame_size(&mInput->stream->common);
    mFrameSize = audio_stream_in_frame_size(mInput->stream);
    mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common);
    mFrameCount = mBufferSize / mFrameSize;
    // This is the formula for calculating the temporary buffer size.