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

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

AudioTrack::mute() is unused so remove it

If ever needed again, it could be implemented on client side by forcing
a track volume of 0.

Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
parent 391f1bb9
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -258,12 +258,6 @@ public:
     */
            void        pause();

    /* Mute or unmute this track.
     * While muted, the callback, if set, is still called.
     */
            void        mute(bool);
            bool        muted() const   { return mMuted; }

    /* Set volume for this track, mostly used for games' sound effects
     * left and right volumes. Levels must be >= 0.0 and <= 1.0.
     * This is the older API.  New applications should use setVolume(float) when possible.
@@ -524,9 +518,7 @@ protected:

    audio_format_t          mFormat;                // as requested by client, not forced to 16-bit
    audio_stream_type_t     mStreamType;
    uint8_t                 mChannelCount;
    uint8_t                 mMuted;
    uint8_t                 mReserved;
    uint32_t                mChannelCount;
    audio_channel_mask_t    mChannelMask;

                // mFrameSize is equal to mFrameSizeAF for non-PCM or 16-bit PCM data.
+0 −5
Original line number Diff line number Diff line
@@ -54,11 +54,6 @@ public:
     */
    virtual void        flush() = 0;

    /* Mute or unmute this track.
     * While muted, the callback, if set, is still called.
     */
    virtual void        mute(bool) = 0;

    /* Pause a track. If set, the callback will cease being called and
     * obtainBuffer will return an error. Buffers that are already released
     * will continue to be processed, unless/until flush() is called.
+2 −9
Original line number Diff line number Diff line
@@ -304,7 +304,6 @@ status_t AudioTrack::set(
    }

    mSharedBuffer = sharedBuffer;
    mMuted = false;
    mActive = false;
    mUserData = user;
    mLoopCount = 0;
@@ -453,12 +452,6 @@ void AudioTrack::pause()
    }
}

void AudioTrack::mute(bool e)
{
    mAudioTrack->mute(e);
    mMuted = e;
}

status_t AudioTrack::setVolume(float left, float right)
{
    if (left < 0.0f || left > 1.0f || right < 0.0f || right > 1.0f) {
@@ -1424,8 +1417,8 @@ status_t AudioTrack::dump(int fd, const Vector<String16>& args) const
    snprintf(buffer, 255, "  format(%d), channel count(%d), frame count(%d)\n", mFormat,
            mChannelCount, mFrameCount);
    result.append(buffer);
    snprintf(buffer, 255, "  sample rate(%u), status(%d), muted(%d)\n",
            (cblk == 0) ? 0 : cblk->sampleRate, mStatus, mMuted);
    snprintf(buffer, 255, "  sample rate(%u), status(%d)\n",
            (cblk == 0) ? 0 : cblk->sampleRate, mStatus);
    result.append(buffer);
    snprintf(buffer, 255, "  active(%d), latency (%d)\n", mActive, mLatency);
    result.append(buffer);
+1 −14
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ enum {
    START,
    STOP,
    FLUSH,
    MUTE,
    RESERVED, // was MUTE
    PAUSE,
    ATTACH_AUX_EFFECT,
    ALLOCATE_TIMED_BUFFER,
@@ -88,14 +88,6 @@ public:
        remote()->transact(FLUSH, data, &reply);
    }

    virtual void mute(bool e)
    {
        Parcel data, reply;
        data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor());
        data.writeInt32(e);
        remote()->transact(MUTE, data, &reply);
    }

    virtual void pause()
    {
        Parcel data, reply;
@@ -192,11 +184,6 @@ status_t BnAudioTrack::onTransact(
            flush();
            return NO_ERROR;
        } break;
        case MUTE: {
            CHECK_INTERFACE(IAudioTrack, data, reply);
            mute( data.readInt32() );
            return NO_ERROR;
        } break;
        case PAUSE: {
            CHECK_INTERFACE(IAudioTrack, data, reply);
            pause();
+0 −1
Original line number Diff line number Diff line
@@ -385,7 +385,6 @@ private:
        virtual status_t    start();
        virtual void        stop();
        virtual void        flush();
        virtual void        mute(bool);
        virtual void        pause();
        virtual status_t    attachAuxEffect(int effectId);
        virtual status_t    allocateTimedBuffer(size_t size,
Loading