summaryrefslogtreecommitdiff
path: root/apps/codecs/wavpack_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wavpack_enc.c')
-rw-r--r--apps/codecs/wavpack_enc.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c
index cf58a5973a..70261e70e2 100644
--- a/apps/codecs/wavpack_enc.c
+++ b/apps/codecs/wavpack_enc.c
@@ -343,9 +343,6 @@ static bool init_encoder(void)
343 ci->enc_set_parameters == NULL || 343 ci->enc_set_parameters == NULL ||
344 ci->enc_get_chunk == NULL || 344 ci->enc_get_chunk == NULL ||
345 ci->enc_finish_chunk == NULL || 345 ci->enc_finish_chunk == NULL ||
346#ifdef HAVE_ADJUSTABLE_CPU_FREQ
347 ci->enc_pcm_buf_near_empty == NULL ||
348#endif
349 ci->enc_get_pcm_data == NULL || 346 ci->enc_get_pcm_data == NULL ||
350 ci->enc_unget_pcm_data == NULL ) 347 ci->enc_unget_pcm_data == NULL )
351 return false; 348 return false;
@@ -386,10 +383,6 @@ static bool init_encoder(void)
386 383
387enum codec_status codec_main(void) 384enum codec_status codec_main(void)
388{ 385{
389#ifdef HAVE_ADJUSTABLE_CPU_FREQ
390 bool cpu_boosted;
391#endif
392
393 /* initialize params and config */ 386 /* initialize params and config */
394 if (!init_encoder()) 387 if (!init_encoder())
395 { 388 {
@@ -400,11 +393,6 @@ enum codec_status codec_main(void)
400 /* main application waits for this flag during encoder loading */ 393 /* main application waits for this flag during encoder loading */
401 ci->enc_codec_loaded = 1; 394 ci->enc_codec_loaded = 1;
402 395
403#ifdef HAVE_ADJUSTABLE_CPU_FREQ
404 ci->cpu_boost(true);
405 cpu_boosted = true;
406#endif
407
408 /* main encoding loop */ 396 /* main encoding loop */
409 while(!ci->stop_encoder) 397 while(!ci->stop_encoder)
410 { 398 {
@@ -422,13 +410,6 @@ enum codec_status codec_main(void)
422 410
423 abort_chunk = true; 411 abort_chunk = true;
424 412
425#ifdef HAVE_ADJUSTABLE_CPU_FREQ
426 if (!cpu_boosted && ci->enc_pcm_buf_near_empty() == 0)
427 {
428 ci->cpu_boost(true);
429 cpu_boosted = true;
430 }
431#endif
432 chunk = ci->enc_get_chunk(); 413 chunk = ci->enc_get_chunk();
433 414
434 /* reset counts and pointer */ 415 /* reset counts and pointer */
@@ -472,21 +453,9 @@ enum codec_status codec_main(void)
472 } 453 }
473 } 454 }
474 455
475#ifdef HAVE_ADJUSTABLE_CPU_FREQ
476 if (cpu_boosted && ci->enc_pcm_buf_near_empty() != 0)
477 {
478 ci->cpu_boost(false);
479 cpu_boosted = false;
480 }
481#endif
482 ci->yield(); 456 ci->yield();
483 } 457 }
484 458
485#ifdef HAVE_ADJUSTABLE_CPU_FREQ
486 if (cpu_boosted) /* set initial boost state */
487 ci->cpu_boost(false);
488#endif
489
490 /* reset parameters to initial state */ 459 /* reset parameters to initial state */
491 ci->enc_set_parameters(NULL); 460 ci->enc_set_parameters(NULL);
492 461