Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit e54fecb

Browse files
authored
Merge pull request #45 from rsp4jack/logging
Rescue commented logging calls @rsp4jack : Thanks!!!
2 parents 461d878 + 602284c commit e54fecb

File tree

14 files changed

+105
-78
lines changed

14 files changed

+105
-78
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ list(APPEND HEADERS
127127
arm-wt-22k/host_src/eas_chorus.h
128128
arm-wt-22k/host_src/eas_reverb.h
129129
arm-wt-22k/host_src/eas_types.h
130+
arm-wt-22k/host_src/eas_report.h
130131
#arm-wt-22k/host_src/jet.h
131132
)
132133

arm-wt-22k/host_src/eas_report.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ static int severityLevel = 9999;
4444
static FILE *debugFile = NULL;
4545
int flush = 0;
4646

47-
#ifndef _NO_DEBUG_PREPROCESSOR
48-
4947
/* structure should have an #include for each error message header file */
5048
S_DEBUG_MESSAGES debugMessages[] =
5149
{
@@ -176,7 +174,6 @@ void EAS_ReportEx (int severity, unsigned long hashCode, int serialNum, ...)
176174
printf("Unrecognized error: Severity=%d; HashCode=%lu; SerialNum=%d\n", severity, hashCode, serialNum);
177175
} /* end EAS_ReportEx */
178176

179-
#else
180177
/*----------------------------------------------------------------------------
181178
* EAS_Report()
182179
*
@@ -236,7 +233,6 @@ void EAS_ReportX (int severity, const char *fmt, ...)
236233
}
237234
va_end(vargs);
238235
} /* end EAS_ReportX */
239-
#endif
240236

241237
/*----------------------------------------------------------------------------
242238
* EAS_SetDebugLevel()

arm-wt-22k/host_src/eas_report.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
extern "C" {
4747
#endif
4848

49-
#ifndef _NO_DEBUG_PREPROCESSOR
50-
5149
/* structure for included debug message header files */
5250
typedef struct
5351
{
@@ -59,14 +57,10 @@ typedef struct
5957
/* debug message handling prototypes */
6058
extern void EAS_ReportEx (int severity, unsigned long hashCode, int serialNum, ...);
6159

62-
#else
63-
6460
/* these prototypes are used if the debug preprocessor is not used */
6561
extern void EAS_Report (int severity, const char* fmt, ...);
6662
extern void EAS_ReportX (int severity, const char* fmt, ...);
6763

68-
#endif
69-
7064
extern void EAS_SetDebugLevel (int severity);
7165
extern void EAS_SetDebugFile (void *file, int flushAfterWrite);
7266

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../host_src/eas_report.h

arm-wt-22k/lib_src/eas_dlssynth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ static void DLS_UpdateEnvelope (S_SYNTH_VOICE *pVoice, S_SYNTH_CHANNEL *pChannel
584584
return;
585585

586586
default:
587-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Envelope in invalid state %d\n", *pState); */ }
587+
EAS_Report(_EAS_SEVERITY_ERROR, "Envelope in invalid state %d\n", *pState);
588588
break;
589589
}
590590
}

arm-wt-22k/lib_src/eas_mdls.c

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ EAS_RESULT DLSParser (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE fileHandle,
518518
return result;
519519
if (temp != CHUNK_DLS)
520520
{
521-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Expected DLS chunk, got %08lx\n", temp); */ }
521+
EAS_Report(_EAS_SEVERITY_ERROR, "Expected DLS chunk, got %08lx\n", temp);
522522
return EAS_ERROR_FILE_FORMAT;
523523
}
524524

@@ -569,21 +569,21 @@ EAS_RESULT DLSParser (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE fileHandle,
569569
/* must have a lins chunk */
570570
if (linsSize == 0)
571571
{
572-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "No lins chunk found"); */ }
572+
EAS_Report(_EAS_SEVERITY_ERROR, "No lins chunk found");
573573
return EAS_ERROR_UNRECOGNIZED_FORMAT;
574574
}
575575

576576
/* must have a wvpl chunk */
577577
if (wvplSize == 0)
578578
{
579-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "No wvpl chunk found"); */ }
579+
EAS_Report(_EAS_SEVERITY_ERROR, "No wvpl chunk found");
580580
return EAS_ERROR_UNRECOGNIZED_FORMAT;
581581
}
582582

583583
/* must have a ptbl chunk */
584584
if ((ptblSize == 0) || (ptblSize > (EAS_I32) (DLS_MAX_WAVE_COUNT * sizeof(POOLCUE) + sizeof(POOLTABLE))))
585585
{
586-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "No ptbl chunk found"); */ }
586+
EAS_Report(_EAS_SEVERITY_ERROR, "No ptbl chunk found");
587587
return EAS_ERROR_UNRECOGNIZED_FORMAT;
588588
}
589589

@@ -594,15 +594,15 @@ EAS_RESULT DLSParser (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE fileHandle,
594594
/* limit check */
595595
if ((dls.waveCount == 0) || (dls.waveCount > DLS_MAX_WAVE_COUNT))
596596
{
597-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS file contains invalid #waves [%u]\n", dls.waveCount); */ }
597+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS file contains invalid #waves [%u]\n", dls.waveCount);
598598
return EAS_ERROR_FILE_FORMAT;
599599
}
600600

601601
/* allocate memory for wsmp data */
602602
dls.wsmpData = EAS_HWMalloc(dls.hwInstData, (EAS_I32) (sizeof(S_WSMP_DATA) * dls.waveCount));
603603
if (dls.wsmpData == NULL)
604604
{
605-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "EAS_HWMalloc for wsmp data failed\n"); */ }
605+
EAS_Report(_EAS_SEVERITY_ERROR, "EAS_HWMalloc for wsmp data failed\n");
606606
return EAS_ERROR_MALLOC_FAILED;
607607
}
608608
EAS_HWMemSet(dls.wsmpData, 0, (EAS_I32) (sizeof(S_WSMP_DATA) * dls.waveCount));
@@ -615,23 +615,23 @@ EAS_RESULT DLSParser (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE fileHandle,
615615
/* limit check */
616616
if ((dls.regionCount == 0) || (dls.regionCount > DLS_MAX_REGION_COUNT))
617617
{
618-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS file contains invalid #regions [%u]\n", dls.regionCount); */ }
618+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS file contains invalid #regions [%u]\n", dls.regionCount);
619619
EAS_HWFree(dls.hwInstData, dls.wsmpData);
620620
return EAS_ERROR_FILE_FORMAT;
621621
}
622622

623623
/* limit check */
624624
if ((dls.artCount == 0) || (dls.artCount > DLS_MAX_ART_COUNT))
625625
{
626-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS file contains invalid #articulations [%u]\n", dls.regionCount); */ }
626+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS file contains invalid #articulations [%u]\n", dls.artCount);
627627
EAS_HWFree(dls.hwInstData, dls.wsmpData);
628628
return EAS_ERROR_FILE_FORMAT;
629629
}
630630

631631
/* limit check */
632632
if ((dls.instCount == 0) || (dls.instCount > DLS_MAX_INST_COUNT))
633633
{
634-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS file contains invalid #instruments [%u]\n", dls.instCount); */ }
634+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS file contains invalid #instruments [%u]\n", dls.instCount);
635635
EAS_HWFree(dls.hwInstData, dls.wsmpData);
636636
return EAS_ERROR_FILE_FORMAT;
637637
}
@@ -661,7 +661,7 @@ EAS_RESULT DLSParser (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE fileHandle,
661661
dls.pDLS = EAS_HWMalloc(dls.hwInstData, size);
662662
if (dls.pDLS == NULL)
663663
{
664-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "EAS_HWMalloc failed for DLS memory allocation size %ld\n", size); */ }
664+
EAS_Report(_EAS_SEVERITY_ERROR, "EAS_HWMalloc failed for DLS memory allocation size %ld\n", size);
665665
EAS_HWFree(dls.hwInstData, dls.wsmpData);
666666
return EAS_ERROR_MALLOC_FAILED;
667667
}
@@ -805,6 +805,7 @@ static EAS_RESULT NextChunk (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 *pPos, EAS
805805
return result;
806806

807807
if (*pSize < 0) {
808+
EAS_Report(_EAS_SEVERITY_ERROR, "Invalid DLS chunk size\n");
808809
ALOGE("b/37093318");
809810
return EAS_ERROR_FILE_FORMAT;
810811
}
@@ -890,7 +891,7 @@ static EAS_RESULT Parse_ptbl (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
890891
return result;
891892
if (temp > (EAS_U32) wtblSize)
892893
{
893-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Ptbl offset exceeds size of wtbl\n"); */ }
894+
EAS_Report(_EAS_SEVERITY_ERROR, "Ptbl offset exceeds size of wtbl\n");
894895
EAS_HWCloseFile(pDLSData->hwInstData, tempFile);
895896
return EAS_ERROR_FILE_FORMAT;
896897
}
@@ -946,7 +947,7 @@ static EAS_RESULT Parse_wave (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
946947
/* make sure it is a wave chunk */
947948
if (temp != CHUNK_WAVE)
948949
{
949-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Offset in ptbl does not point to wave chunk\n"); */ }
950+
EAS_Report(_EAS_SEVERITY_ERROR, "Offset in ptbl does not point to wave chunk\n");
950951
return EAS_ERROR_FILE_FORMAT;
951952
}
952953

@@ -1004,14 +1005,14 @@ static EAS_RESULT Parse_wave (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
10041005
/* must have a fmt chunk */
10051006
if (!fmtPos)
10061007
{
1007-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS wave chunk has no fmt chunk\n"); */ }
1008+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS wave chunk has no fmt chunk\n");
10081009
return EAS_ERROR_UNRECOGNIZED_FORMAT;
10091010
}
10101011

10111012
/* must have a data chunk */
10121013
if (!dataPos)
10131014
{
1014-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS wave chunk has no data chunk\n"); */ }
1015+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS wave chunk has no data chunk\n");
10151016
return EAS_ERROR_UNRECOGNIZED_FORMAT;
10161017
}
10171018

@@ -1081,7 +1082,7 @@ static EAS_RESULT Parse_wave (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
10811082
pDLSData->wavePoolOffset += (EAS_U32) size;
10821083
if (pDLSData->wavePoolOffset > pDLSData->wavePoolSize)
10831084
{
1084-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Wave pool exceeded allocation\n"); */ }
1085+
EAS_Report(_EAS_SEVERITY_ERROR, "Wave pool exceeded allocation\n");
10851086
return EAS_ERROR_SOUND_LIBRARY;
10861087
}
10871088

@@ -1128,7 +1129,7 @@ static EAS_RESULT Parse_wsmp (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WS
11281129
else
11291130
{
11301131
p->unityNote = 60;
1131-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "Invalid unity note [%u] in DLS wsmp ignored, set to 60\n", wtemp); */ }
1132+
EAS_Report(_EAS_SEVERITY_WARNING, "Invalid unity note [%u] in DLS wsmp ignored, set to 60\n", wtemp);
11321133
}
11331134

11341135
/* get fine tune */
@@ -1140,7 +1141,7 @@ static EAS_RESULT Parse_wsmp (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WS
11401141
return result;
11411142
if (p->gain > 0)
11421143
{
1143-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "Positive gain [%ld] in DLS wsmp ignored, set to 0dB\n", p->gain); */ }
1144+
EAS_Report(_EAS_SEVERITY_DETAIL, "Positive gain [%ld] in DLS wsmp ignored, set to 0dB\n", p->gain);
11441145
p->gain = 0;
11451146
}
11461147

@@ -1157,7 +1158,7 @@ static EAS_RESULT Parse_wsmp (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WS
11571158
{
11581159

11591160
if (ltemp > 1)
1160-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS sample with %lu loops, ignoring extra loops\n", ltemp); */ }
1161+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS sample with %lu loops, ignoring extra loops\n", ltemp);
11611162

11621163
/* skip ahead to loop data */
11631164
if ((result = EAS_HWFileSeek(pDLSData->hwInstData, pDLSData->fileHandle, pos + (EAS_I32) cbSize)) != EAS_SUCCESS)
@@ -1227,7 +1228,7 @@ static EAS_RESULT Parse_fmt (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WSM
12271228
p->fmtTag = wtemp;
12281229
break;
12291230
default:
1230-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Unsupported DLS sample format %04x\n", wtemp); */ }
1231+
EAS_Report(_EAS_SEVERITY_ERROR, "Unsupported DLS sample format %04x\n", wtemp);
12311232
return EAS_ERROR_UNRECOGNIZED_FORMAT;
12321233
}
12331234

@@ -1236,7 +1237,7 @@ static EAS_RESULT Parse_fmt (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WSM
12361237
return result;
12371238
if (wtemp != 1)
12381239
{
1239-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "No support for DLS multi-channel samples\n"); */ }
1240+
EAS_Report(_EAS_SEVERITY_ERROR, "No support for DLS multi-channel samples\n");
12401241
return EAS_ERROR_UNRECOGNIZED_FORMAT;
12411242
}
12421243

@@ -1258,7 +1259,7 @@ static EAS_RESULT Parse_fmt (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_WSM
12581259

12591260
if ((p->bitsPerSample != 8) && (p->bitsPerSample != 16))
12601261
{
1261-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "Unsupported DLS bits-per-sample %d\n", p->bitsPerSample); */ }
1262+
EAS_Report(_EAS_SEVERITY_ERROR, "Unsupported DLS bits-per-sample %d\n", p->bitsPerSample);
12621263
return EAS_ERROR_UNRECOGNIZED_FORMAT;
12631264
}
12641265

@@ -1661,14 +1662,14 @@ static EAS_RESULT Parse_ins (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_I
16611662
/* must have an lrgn to be useful */
16621663
if (!lrgnPos)
16631664
{
1664-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS ins chunk has no lrgn chunk\n"); */ }
1665+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS ins chunk has no lrgn chunk\n");
16651666
return EAS_ERROR_UNRECOGNIZED_FORMAT;
16661667
}
16671668

16681669
/* must have an insh to be useful */
16691670
if (!inshPos)
16701671
{
1671-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS ins chunk has no insh chunk\n"); */ }
1672+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS ins chunk has no insh chunk\n");
16721673
return EAS_ERROR_UNRECOGNIZED_FORMAT;
16731674
}
16741675

@@ -1751,7 +1752,7 @@ static EAS_RESULT Parse_insh (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
17511752
/* verify the parameters are valid */
17521753
if (bank & 0x7fff8080)
17531754
{
1754-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS bank number is out of range: %08lx\n", bank); */ }
1755+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS bank number is out of range: %08lx\n", bank);
17551756
}
17561757
if (bank & 0x80000000u)
17571758
{
@@ -1766,7 +1767,7 @@ static EAS_RESULT Parse_insh (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
17661767
}
17671768
if (program > 127)
17681769
{
1769-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS program number is out of range: %08lx\n", program); */ }
1770+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS program number is out of range: %08lx\n", program);
17701771
program &= 0x7f;
17711772
}
17721773

@@ -1816,7 +1817,7 @@ static EAS_RESULT Parse_lrgn (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
18161817
{
18171818
if (regionCount == numRegions)
18181819
{
1819-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS region count exceeded cRegions value in insh, extra region ignored\n"); */ }
1820+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS region count exceeded cRegions value in insh, extra region ignored\n");
18201821
return EAS_SUCCESS;
18211822
}
18221823
/* if second pass, ensure regionCount is less than numDLSRegions */
@@ -1933,14 +1934,14 @@ static EAS_RESULT Parse_rgn (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_I
19331934
/* must have a rgnh chunk to be useful */
19341935
if (!rgnhPos)
19351936
{
1936-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS rgn chunk has no rgnh chunk\n"); */ }
1937+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS rgn chunk has no rgnh chunk\n");
19371938
return EAS_ERROR_UNRECOGNIZED_FORMAT;
19381939
}
19391940

19401941
/* must have a wlnk chunk to be useful */
19411942
if (!wlnkPos)
19421943
{
1943-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "DLS rgn chunk has no wlnk chunk\n"); */ }
1944+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS rgn chunk has no wlnk chunk\n");
19441945
return EAS_ERROR_UNRECOGNIZED_FORMAT;
19451946
}
19461947

@@ -2058,12 +2059,12 @@ static EAS_RESULT Parse_rgnh (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_DL
20582059
/* check the range */
20592060
if (lowKey > 127)
20602061
{
2061-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS rgnh: Low key out of range [%u]\n", lowKey); */ }
2062+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS rgnh: Low key out of range [%u]\n", lowKey);
20622063
lowKey = 127;
20632064
}
20642065
if (highKey > 127)
20652066
{
2066-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS rgnh: High key out of range [%u]\n", lowKey); */ }
2067+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS rgnh: High key out of range [%u]\n", lowKey);
20672068
highKey = 127;
20682069
}
20692070

@@ -2076,12 +2077,12 @@ static EAS_RESULT Parse_rgnh (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_DL
20762077
/* check the range */
20772078
if (lowVel > 127)
20782079
{
2079-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS rgnh: Low velocity out of range [%u]\n", lowVel); */ }
2080+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS rgnh: Low velocity out of range [%u]\n", lowVel);
20802081
lowVel = 127;
20812082
}
20822083
if (highVel > 127)
20832084
{
2084-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "DLS rgnh: High velocity out of range [%u]\n", highVel); */ }
2085+
EAS_Report(_EAS_SEVERITY_WARNING, "DLS rgnh: High velocity out of range [%u]\n", highVel);
20852086
highVel = 127;
20862087
}
20872088

@@ -2260,7 +2261,7 @@ static EAS_RESULT Parse_art (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, S_DLS
22602261
}
22612262
}
22622263
if (i == PARAM_TABLE_SIZE)
2263-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "WARN: Unsupported parameter in DLS file\n"); */ }
2264+
EAS_Report(_EAS_SEVERITY_WARNING, "WARN: Unsupported parameter in DLS file\n");
22642265
}
22652266

22662267
return EAS_SUCCESS;
@@ -2338,6 +2339,7 @@ static EAS_RESULT PushcdlStack (EAS_U32 *pStack, EAS_INT *pStackPtr, EAS_U32 val
23382339

23392340
/* stack overflow, return an error */
23402341
if (*pStackPtr >= (CDL_STACK_SIZE - 1)) {
2342+
EAS_Report(_EAS_SEVERITY_ERROR, "DLS cdl stack overflow\n");
23412343
ALOGE("b/34031018, stackPtr(%d)", *pStackPtr);
23422344
android_errorWriteLog(0x534e4554, "34031018");
23432345
return EAS_ERROR_FILE_FORMAT;
@@ -2563,7 +2565,7 @@ static EAS_RESULT Parse_cdl (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 size, EAS_
25632565
x = QueryGUID(&dlsid, &y);
25642566
}
25652567
else
2566-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "Unsupported opcode %d in DLS file\n", opcode); */ }
2568+
EAS_Report(_EAS_SEVERITY_WARNING, "Unsupported opcode %d in DLS file\n", opcode);
25672569

25682570
/* push the result on the stack */
25692571
if ((result = PushcdlStack(stack, &stackPtr, x)) != EAS_SUCCESS)

arm-wt-22k/lib_src/eas_midi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ EAS_RESULT EAS_ParseMIDIStream (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_ST
207207
}
208208

209209
/* no status byte received, provide a warning, but we should be able to recover */
210-
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_WARNING, "Received MIDI data without a valid status byte: %d\n",c); */ }
210+
EAS_Report(_EAS_SEVERITY_WARNING, "Received MIDI data without a valid status byte: %d\n",c);
211211
pMIDIStream->pending = EAS_FALSE;
212212
return EAS_SUCCESS;
213213
}

0 commit comments

Comments
 (0)