@@ -52,8 +52,8 @@ static EchoAudioEngine engine;
5252bool EngineService (void * ctx, uint32_t msg, void * data);
5353
5454JNIEXPORT void JNICALL Java_com_google_sample_echo_MainActivity_createSLEngine (
55- JNIEnv* env , jclass type , jint sampleRate, jint framesPerBuf,
56- jlong delayInMs, jfloat decay) {
55+ JNIEnv*, jclass, jint sampleRate, jint framesPerBuf, jlong delayInMs ,
56+ jfloat decay) {
5757 SLresult result;
5858 memset (&engine, 0 , sizeof (engine));
5959
@@ -103,7 +103,7 @@ JNIEXPORT void JNICALL Java_com_google_sample_echo_MainActivity_createSLEngine(
103103}
104104
105105JNIEXPORT jboolean JNICALL
106- Java_com_google_sample_echo_MainActivity_configureEcho (JNIEnv* env , jclass type ,
106+ Java_com_google_sample_echo_MainActivity_configureEcho (JNIEnv*, jclass,
107107 jint delayInMs,
108108 jfloat decay) {
109109 engine.echoDelay_ = delayInMs;
@@ -116,7 +116,7 @@ Java_com_google_sample_echo_MainActivity_configureEcho(JNIEnv* env, jclass type,
116116
117117JNIEXPORT jboolean JNICALL
118118Java_com_google_sample_echo_MainActivity_createSLBufferQueueAudioPlayer (
119- JNIEnv* env , jclass type ) {
119+ JNIEnv*, jclass) {
120120 SampleFormat sampleFormat;
121121 memset (&sampleFormat, 0 , sizeof (sampleFormat));
122122 sampleFormat.pcmFormat_ = (uint16_t )engine.bitsPerSample_ ;
@@ -138,16 +138,15 @@ Java_com_google_sample_echo_MainActivity_createSLBufferQueueAudioPlayer(
138138
139139JNIEXPORT void JNICALL
140140Java_com_google_sample_echo_MainActivity_deleteSLBufferQueueAudioPlayer (
141- JNIEnv* env , jclass type ) {
141+ JNIEnv*, jclass) {
142142 if (engine.player_ ) {
143143 delete engine.player_ ;
144144 engine.player_ = nullptr ;
145145 }
146146}
147147
148148JNIEXPORT jboolean JNICALL
149- Java_com_google_sample_echo_MainActivity_createAudioRecorder (JNIEnv* env,
150- jclass type) {
149+ Java_com_google_sample_echo_MainActivity_createAudioRecorder (JNIEnv*, jclass) {
151150 SampleFormat sampleFormat;
152151 memset (&sampleFormat, 0 , sizeof (sampleFormat));
153152 sampleFormat.pcmFormat_ = static_cast <uint16_t >(engine.bitsPerSample_ );
@@ -166,15 +165,14 @@ Java_com_google_sample_echo_MainActivity_createAudioRecorder(JNIEnv* env,
166165}
167166
168167JNIEXPORT void JNICALL
169- Java_com_google_sample_echo_MainActivity_deleteAudioRecorder (JNIEnv* env,
170- jclass type) {
168+ Java_com_google_sample_echo_MainActivity_deleteAudioRecorder (JNIEnv*, jclass) {
171169 if (engine.recorder_ ) delete engine.recorder_ ;
172170
173171 engine.recorder_ = nullptr ;
174172}
175173
176174JNIEXPORT void JNICALL
177- Java_com_google_sample_echo_MainActivity_startPlay (JNIEnv* env , jclass type ) {
175+ Java_com_google_sample_echo_MainActivity_startPlay (JNIEnv*, jclass) {
178176 engine.frameCount_ = 0 ;
179177 /*
180178 * start player: make it into waitForData state
@@ -187,7 +185,7 @@ Java_com_google_sample_echo_MainActivity_startPlay(JNIEnv* env, jclass type) {
187185}
188186
189187JNIEXPORT void JNICALL
190- Java_com_google_sample_echo_MainActivity_stopPlay (JNIEnv* env , jclass type ) {
188+ Java_com_google_sample_echo_MainActivity_stopPlay (JNIEnv*, jclass) {
191189 engine.recorder_ ->Stop ();
192190 engine.player_ ->Stop ();
193191
@@ -197,8 +195,8 @@ Java_com_google_sample_echo_MainActivity_stopPlay(JNIEnv* env, jclass type) {
197195 engine.player_ = NULL ;
198196}
199197
200- JNIEXPORT void JNICALL Java_com_google_sample_echo_MainActivity_deleteSLEngine (
201- JNIEnv* env , jclass type ) {
198+ JNIEXPORT void JNICALL
199+ Java_com_google_sample_echo_MainActivity_deleteSLEngine ( JNIEnv*, jclass) {
202200 delete engine.recBufQueue_ ;
203201 delete engine.freeBufQueue_ ;
204202 releaseSampleBufs (engine.bufs_ , engine.bufCount_ );
@@ -236,7 +234,7 @@ uint32_t dbgEngineGetBufCount(void) {
236234/*
237235 * simple message passing for player/recorder to communicate with engine
238236 */
239- bool EngineService (void * ctx, uint32_t msg, void * data) {
237+ bool EngineService ([[maybe_unused]] void * ctx, uint32_t msg, void * data) {
240238 assert (ctx == &engine);
241239 switch (msg) {
242240 case ENGINE_SERVICE_MSG_RETRIEVE_DUMP_BUFS : {
0 commit comments