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

Commit 73493688 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

AudioRecord::openRecord_l now take flags

The new parameter 'flags' of type audio_input_flags_t will be used for
requesting a fast track, but is currently ignored.

Change-Id: If68dfda8b2d4eaaca42927d721b4630c47f71f3b
parent 90e58b1f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -423,6 +423,7 @@ private:
            status_t openRecord_l(uint32_t sampleRate,
            status_t openRecord_l(uint32_t sampleRate,
                                audio_format_t format,
                                audio_format_t format,
                                size_t frameCount,
                                size_t frameCount,
                                audio_input_flags_t flags,
                                audio_io_handle_t input,
                                audio_io_handle_t input,
                                size_t epoch);
                                size_t epoch);


+3 −2
Original line number Original line Diff line number Diff line
@@ -253,7 +253,7 @@ status_t AudioRecord::set(
    }
    }


    // create the IAudioRecord
    // create the IAudioRecord
    status = openRecord_l(sampleRate, format, frameCount, input, 0 /*epoch*/);
    status = openRecord_l(sampleRate, format, frameCount, mFlags, input, 0 /*epoch*/);
    if (status != NO_ERROR) {
    if (status != NO_ERROR) {
        return status;
        return status;
    }
    }
@@ -438,6 +438,7 @@ status_t AudioRecord::openRecord_l(
        uint32_t sampleRate,
        uint32_t sampleRate,
        audio_format_t format,
        audio_format_t format,
        size_t frameCount,
        size_t frameCount,
        audio_input_flags_t flags,
        audio_io_handle_t input,
        audio_io_handle_t input,
        size_t epoch)
        size_t epoch)
{
{
@@ -911,7 +912,7 @@ status_t AudioRecord::restoreRecord_l(const char *from)
    // It will also delete the strong references on previous IAudioRecord and IMemory
    // It will also delete the strong references on previous IAudioRecord and IMemory
    size_t position = mProxy->getPosition();
    size_t position = mProxy->getPosition();
    mNewPosition = position + mUpdatePeriod;
    mNewPosition = position + mUpdatePeriod;
    result = openRecord_l(mSampleRate, mFormat, mFrameCount, getInput_l(), position);
    result = openRecord_l(mSampleRate, mFormat, mFrameCount, mFlags, getInput_l(), position);
    if (result == NO_ERROR) {
    if (result == NO_ERROR) {
        if (mActive) {
        if (mActive) {
            // callback thread or sync event hasn't changed
            // callback thread or sync event hasn't changed