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

Commit b37fcbfd authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "Added getter for session Id to AudioSink" into gingerbread

parents bb245d35 b3bdf3f0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ public:
        virtual uint32_t    latency() const = 0;
        virtual float       msecsPerFrame() const = 0;
        virtual status_t    getPosition(uint32_t *position) = 0;
        virtual int         getSessionId() = 0;

        // If no callback is specified, use the "write" API below to submit
        // audio data.
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ android_media_MediaPlayer_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloa
}

static void android_media_MediaPlayer_attachAuxEffect(JNIEnv *env,  jobject thiz, jint effectId) {
    LOGV("attachAuxEffect(): %d", sessionId);
    LOGV("attachAuxEffect(): %d", effectId);
    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
    if (mp == NULL ) {
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ MediaPlayer::MediaPlayer()
    mVideoWidth = mVideoHeight = 0;
    mLockThreadId = 0;
    mAudioSessionId = AudioSystem::newAudioSessionId();
    mSendLevel = 0;
}

MediaPlayer::~MediaPlayer()
+10 −0
Original line number Diff line number Diff line
@@ -1546,6 +1546,11 @@ void MediaPlayerService::AudioOutput::CallbackWrapper(

}

int MediaPlayerService::AudioOutput::getSessionId()
{
    return mSessionId;
}

#undef LOG_TAG
#define LOG_TAG "AudioCache"
MediaPlayerService::AudioCache::AudioCache(const char* name) :
@@ -1733,4 +1738,9 @@ void MediaPlayerService::AudioCache::notify(void* cookie, int msg, int ext1, int
    p->mSignal.signal();
}

int MediaPlayerService::AudioCache::getSessionId()
{
    return 0;
}

} // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ class MediaPlayerService : public BnMediaPlayerService
        virtual uint32_t        latency() const;
        virtual float           msecsPerFrame() const;
        virtual status_t        getPosition(uint32_t *position);
        virtual int             getSessionId();

        virtual status_t        open(
                uint32_t sampleRate, int channelCount,
@@ -133,6 +134,7 @@ class MediaPlayerService : public BnMediaPlayerService
        virtual uint32_t        latency() const;
        virtual float           msecsPerFrame() const;
        virtual status_t        getPosition(uint32_t *position);
        virtual int             getSessionId();

        virtual status_t        open(
                uint32_t sampleRate, int channelCount, int format,