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

Commit 25658fd4 authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

auto import from //branches/cupcake/...@132276

parent 7a2146d5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -70,7 +70,16 @@ public:
        ROUTE_BLUETOOTH_SCO  = (1 << 2),
        ROUTE_HEADSET        = (1 << 3),
        ROUTE_BLUETOOTH_A2DP = (1 << 4),
        ROUTE_ALL       = 0xFFFFFFFF
        ROUTE_ALL            = -1UL,
    };

    enum audio_in_acoustics {
        AGC_ENABLE    = 0x0001,
        AGC_DISABLE   = 0,
        NS_ENABLE     = 0x0002,
        NS_DISABLE    = 0,
        TX_IIR_ENABLE = 0x0004,
        TX_DISABLE    = 0
    };

    /* These are static methods to control the system-wide AudioFlinger
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ status_t AudioTrack::set(
    }

    // validate parameters
    if (((format != AudioSystem::PCM_8_BIT) || mSharedBuffer != 0) &&
    if (((format != AudioSystem::PCM_8_BIT) || sharedBuffer != 0) &&
        (format != AudioSystem::PCM_16_BIT)) {
        LOGE("Invalid format");
        return BAD_VALUE;
+8 −3
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ int JetPlayer::init()
        mState = EAS_STATE_ERROR;
        return result;
    }
    // init the JET library
    result = JET_Init(mEasData, NULL, 0);
    // init the JET library with the default app event controller range
    result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG));
    if( result != EAS_SUCCESS) {
        LOGE("JetPlayer::init(): Error initializing JET library, aborting.");
        mState = EAS_STATE_ERROR;
@@ -200,6 +200,11 @@ int JetPlayer::render() {
        while (!mRender)
        {
            LOGV("JetPlayer::render(): signal wait");
            if (audioStarted) { 
                mAudioTrack->pause(); 
                // we have to restart the playback once we start rendering again
                audioStarted = false;
            }
            mCondition.wait(mMutex);
            LOGV("JetPlayer::render(): signal rx'd");
        }