diff options
author | Eric Laurent <elaurent@google.com> | 2010-07-28 07:53:24 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-07-28 07:53:24 -0700 |
commit | ed0de3c123aaa86147993721d4794648a65aab75 (patch) | |
tree | c60dc3ffbc36f10adfe01d864e22f1d5b87443d4 /media/libmedia | |
parent | da90dff17b6ce79d0a7d8ab2dbe2aa69cd1c11aa (diff) | |
parent | e99819aa8cc397d02255b59b91c6e6850afee3a7 (diff) | |
download | frameworks_av-ed0de3c123aaa86147993721d4794648a65aab75.zip frameworks_av-ed0de3c123aaa86147993721d4794648a65aab75.tar.gz frameworks_av-ed0de3c123aaa86147993721d4794648a65aab75.tar.bz2 |
am 6fa88882: am 62d83a0c: Merge "Audio effects: modified command() parameter types." into gingerbread
Merge commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf'
* commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf':
Audio effects: modified command() parameter types.
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioEffect.cpp | 20 | ||||
-rw-r--r-- | media/libmedia/IEffect.cpp | 14 | ||||
-rw-r--r-- | media/libmedia/IEffectClient.cpp | 12 | ||||
-rw-r--r-- | media/libmedia/Visualizer.cpp | 2 |
4 files changed, 32 insertions, 16 deletions
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index df0f73b..3cdf48a 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -221,7 +221,11 @@ status_t AudioEffect::setEnabled(bool enabled) return INVALID_OPERATION; } -status_t AudioEffect::command(int32_t cmdCode, int32_t cmdSize, void *cmdData, int32_t *replySize, void *replyData) +status_t AudioEffect::command(uint32_t cmdCode, + uint32_t cmdSize, + void *cmdData, + uint32_t *replySize, + void *replyData) { if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) { return INVALID_OPERATION; @@ -241,8 +245,8 @@ status_t AudioEffect::setParameter(effect_param_t *param) return BAD_VALUE; } - int size = sizeof(int); - int psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; + uint32_t size = sizeof(int); + uint32_t psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; LOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); @@ -285,7 +289,7 @@ status_t AudioEffect::setParameterCommit() if (mCblk->clientIndex == 0) { return INVALID_OPERATION; } - int size = 0; + uint32_t size = 0; return mIEffect->command(EFFECT_CMD_SET_PARAM_COMMIT, 0, NULL, &size, NULL); } @@ -301,7 +305,7 @@ status_t AudioEffect::getParameter(effect_param_t *param) LOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); - int psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; + uint32_t psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; return mIEffect->command(EFFECT_CMD_GET_PARAM, sizeof(effect_param_t) + param->psize, param, &psize, param); } @@ -350,7 +354,11 @@ void AudioEffect::enableStatusChanged(bool enabled) } } -void AudioEffect::commandExecuted(int cmdCode, int cmdSize, void *cmdData, int replySize, void *replyData) +void AudioEffect::commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *cmdData, + uint32_t replySize, + void *replyData) { if (cmdData == NULL || replyData == NULL) { return; diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp index 8e3ac71..a945b97 100644 --- a/media/libmedia/IEffect.cpp +++ b/media/libmedia/IEffect.cpp @@ -59,7 +59,11 @@ public: return reply.readInt32(); } - status_t command(int cmdCode, int cmdSize, void *pCmdData, int *pReplySize, void *pReplyData) + status_t command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *pReplySize, + void *pReplyData) { LOGV("command"); Parcel data, reply; @@ -136,15 +140,15 @@ status_t BnEffect::onTransact( case COMMAND: { LOGV("COMMAND"); CHECK_INTERFACE(IEffect, data, reply); - int cmdCode = data.readInt32(); - int cmdSize = data.readInt32(); + uint32_t cmdCode = data.readInt32(); + uint32_t cmdSize = data.readInt32(); char *cmd = NULL; if (cmdSize) { cmd = (char *)malloc(cmdSize); data.read(cmd, cmdSize); } - int replySize = data.readInt32(); - int replySz = replySize; + uint32_t replySize = data.readInt32(); + uint32_t replySz = replySize; char *resp = NULL; if (replySize) { resp = (char *)malloc(replySize); diff --git a/media/libmedia/IEffectClient.cpp b/media/libmedia/IEffectClient.cpp index e7659ae..1fa9cbe 100644 --- a/media/libmedia/IEffectClient.cpp +++ b/media/libmedia/IEffectClient.cpp @@ -56,7 +56,11 @@ public: remote()->transact(ENABLE_STATUS_CHANGED, data, &reply, IBinder::FLAG_ONEWAY); } - void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData) + void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData) { LOGV("commandExecuted"); Parcel data, reply; @@ -108,14 +112,14 @@ status_t BnEffectClient::onTransact( case COMMAND_EXECUTED: { LOGV("COMMAND_EXECUTED"); CHECK_INTERFACE(IEffectClient, data, reply); - int cmdCode = data.readInt32(); - int cmdSize = data.readInt32(); + uint32_t cmdCode = data.readInt32(); + uint32_t cmdSize = data.readInt32(); char *cmd = NULL; if (cmdSize) { cmd = (char *)malloc(cmdSize); data.read(cmd, cmdSize); } - int replySize = data.readInt32(); + uint32_t replySize = data.readInt32(); char *resp = NULL; if (replySize) { resp = (char *)malloc(replySize); diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index 47e96e5..32cdb49 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -184,7 +184,7 @@ status_t Visualizer::getWaveForm(uint8_t *waveform) status_t status = NO_ERROR; if (mEnabled) { - int32_t replySize = mCaptureSize; + uint32_t replySize = mCaptureSize; status_t status = command(VISU_CMD_CAPTURE, 0, NULL, &replySize, waveform); if (replySize == 0) { status = NOT_ENOUGH_DATA; |