diff options
author | Eric Laurent <elaurent@google.com> | 2010-07-16 07:43:46 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-07-21 06:28:01 -0700 |
commit | 7070b36549d511d6627538c73dfbab23fbae5b43 (patch) | |
tree | 4a489b863b322e28f7047d7873b17a77056f3b41 /include | |
parent | d7514ec6eb17d262d6f9605a2c2f245b7ad7c0b9 (diff) | |
download | frameworks_base-7070b36549d511d6627538c73dfbab23fbae5b43.zip frameworks_base-7070b36549d511d6627538c73dfbab23fbae5b43.tar.gz frameworks_base-7070b36549d511d6627538c73dfbab23fbae5b43.tar.bz2 |
Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
Added methods to AudioTrack and MediaPlayer java classes to enable use of
auxiliary audio effects. The effect can be attached and detached by specifying its
ID and the send level controlled.
Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioTrack.h | 5 | ||||
-rw-r--r-- | include/media/IMediaPlayer.h | 2 | ||||
-rw-r--r-- | include/media/mediaplayer.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index ef537f4..4475d4a 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -261,8 +261,8 @@ public: /* set the send level for this track. An auxiliary effect should be attached * to the track with attachEffect(). Level must be <= 1.0. */ - status_t setSendLevel(float level); - void getSendLevel(float* level); + status_t setAuxEffectSendLevel(float level); + void getAuxEffectSendLevel(float* level); /* set sample rate for this track, mostly used for games' sound effects */ @@ -479,6 +479,7 @@ private: uint32_t mUpdatePeriod; uint32_t mFlags; int mSessionId; + int mAuxEffectId; }; diff --git a/include/media/IMediaPlayer.h b/include/media/IMediaPlayer.h index 2619691..af9a7ed 100644 --- a/include/media/IMediaPlayer.h +++ b/include/media/IMediaPlayer.h @@ -48,6 +48,8 @@ public: virtual status_t setVolume(float leftVolume, float rightVolume) = 0; virtual status_t suspend() = 0; virtual status_t resume() = 0; + virtual status_t setAuxEffectSendLevel(float level) = 0; + virtual status_t attachAuxEffect(int effectId) = 0; // Invoke a generic method on the player by using opaque parcels // for the request and reply. diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 4963f73..207191d 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -173,6 +173,8 @@ public: status_t resume(); status_t setAudioSessionId(int sessionId); int getAudioSessionId(); + status_t setAuxEffectSendLevel(float level); + status_t attachAuxEffect(int effectId); private: void clear_l(); status_t seekTo_l(int msec); @@ -200,6 +202,7 @@ private: int mVideoWidth; int mVideoHeight; int mAudioSessionId; + float mSendLevel; }; }; // namespace android |