summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2022-05-18 22:48:52 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-05-18 22:48:52 +0000
commit2ae6eee375be6eaa267f7fd176986ad438e9a330 (patch)
treee484fb25d9196aa2588717be3c7b9049efd2b240
parenta8e229e96f8160c1dd350241625581167823c0a0 (diff)
parente7875f225f70db00ccad3e121e4c78654613073b (diff)
downloadsonivox-2ae6eee375be6eaa267f7fd176986ad438e9a330.tar.gz
Merge "Fix misleading indentation." am: 1e7ea9068a am: bc685c9b6b am: 31eed4fa43 am: e7875f225f
Original change: https://android-review.googlesource.com/c/platform/external/sonivox/+/2100699 Change-Id: I35b356a135726a4faf4b8220deba1b8a3448e60b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--arm-wt-22k/lib_src/eas_mdls.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/arm-wt-22k/lib_src/eas_mdls.c b/arm-wt-22k/lib_src/eas_mdls.c
index fac6987..6771261 100644
--- a/arm-wt-22k/lib_src/eas_mdls.c
+++ b/arm-wt-22k/lib_src/eas_mdls.c
@@ -1340,31 +1340,32 @@ static EAS_RESULT Parse_data (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
if ((result = EAS_HWFileSeek(pDLSData->hwInstData, pDLSData->fileHandle, pos)) != EAS_SUCCESS)
return result;
- p = pSample;
+ p = pSample;
- while (size)
+ while (size)
+ {
+ /* read a small chunk of data and convert it */
+ count = (size < SAMPLE_CONVERT_CHUNK_SIZE ? size : SAMPLE_CONVERT_CHUNK_SIZE);
+ if ((result = EAS_HWReadFile(pDLSData->hwInstData, pDLSData->fileHandle, convBuf, count, &count)) != EAS_SUCCESS)
{
- /* read a small chunk of data and convert it */
- count = (size < SAMPLE_CONVERT_CHUNK_SIZE ? size : SAMPLE_CONVERT_CHUNK_SIZE);
- if ((result = EAS_HWReadFile(pDLSData->hwInstData, pDLSData->fileHandle, convBuf, count, &count)) != EAS_SUCCESS)
- {
- return result;
- }
- size -= count;
- if (pWsmp->bitsPerSample == 16)
- {
- memcpy(p, convBuf, count);
- p += count >> 1;
- }
- else
+ return result;
+ }
+ size -= count;
+ if (pWsmp->bitsPerSample == 16)
+ {
+ memcpy(p, convBuf, count);
+ p += count >> 1;
+ }
+ else
+ {
+ for(i=0; i<count; i++)
{
- for(i=0; i<count; i++)
- {
- *p++ = (short)((convBuf[i] ^ 0x80) << 8);
- }
+ *p++ = (short)((convBuf[i] ^ 0x80) << 8);
}
-
}
+
+ }
+
/* for looped samples, copy the last sample to the end */
if (pWsmp->loopLength)
{