diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-03 14:50:23 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-01-06 13:35:57 -0800 |
commit | 1099586bd48a8a90bb1cc4e7c279703bc7259214 (patch) | |
tree | c1b5f494fb3a212954495539bfe0c506bfc3dd05 | |
parent | a2a0a5d7d56baa831870f4bf2a0d942a477d92ef (diff) | |
download | frameworks_av-1099586bd48a8a90bb1cc4e7c279703bc7259214.zip frameworks_av-1099586bd48a8a90bb1cc4e7c279703bc7259214.tar.gz frameworks_av-1099586bd48a8a90bb1cc4e7c279703bc7259214.tar.bz2 |
Declare IAudioTrack methods in binder opcode order
This makes it easier to match up the declarations.
Change-Id: I0996c20b2903b778b356dfe52b07b0ec634855dd
-rw-r--r-- | include/media/IAudioTrack.h | 5 | ||||
-rw-r--r-- | media/libmedia/IAudioTrack.cpp | 24 |
2 files changed, 15 insertions, 14 deletions
diff --git a/include/media/IAudioTrack.h b/include/media/IAudioTrack.h index 3fa2bf8..b83e552 100644 --- a/include/media/IAudioTrack.h +++ b/include/media/IAudioTrack.h @@ -35,6 +35,9 @@ class IAudioTrack : public IInterface public: DECLARE_META_INTERFACE(AudioTrack); + /* Get this track's control block */ + virtual sp<IMemory> getCblk() const = 0; + /* After it's created the track is not active. Call start() to * make it active. If set, the callback will start being called. */ @@ -67,8 +70,6 @@ public: */ virtual status_t attachAuxEffect(int effectId) = 0; - /* get this track's control block */ - virtual sp<IMemory> getCblk() const = 0; }; // ---------------------------------------------------------------------------- diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp index bc8ff34..0791437 100644 --- a/media/libmedia/IAudioTrack.cpp +++ b/media/libmedia/IAudioTrack.cpp @@ -46,6 +46,18 @@ public: { } + virtual sp<IMemory> getCblk() const + { + Parcel data, reply; + sp<IMemory> cblk; + data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); + status_t status = remote()->transact(GET_CBLK, data, &reply); + if (status == NO_ERROR) { + cblk = interface_cast<IMemory>(reply.readStrongBinder()); + } + return cblk; + } + virtual status_t start() { Parcel data, reply; @@ -88,18 +100,6 @@ public: remote()->transact(PAUSE, data, &reply); } - virtual sp<IMemory> getCblk() const - { - Parcel data, reply; - sp<IMemory> cblk; - data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor()); - status_t status = remote()->transact(GET_CBLK, data, &reply); - if (status == NO_ERROR) { - cblk = interface_cast<IMemory>(reply.readStrongBinder()); - } - return cblk; - } - virtual status_t attachAuxEffect(int effectId) { Parcel data, reply; |