- if (!strcmp(cmd, "samplerate")) {
- if (pmd->samplerate == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
- *result = make_message("%u", pmd->samplerate);
- return 1;
- }
- if (!strcmp(cmd, "channels")) {
- if (pmd->channels == 0)
- return -ERRNO_TO_PARA_ERROR(ENAVAIL);
- *result = make_message("%u", pmd->channels);
- return 1;
- }
- return -ERRNO_TO_PARA_ERROR(ENOTSUP);
-}
-
-static void mp3dec_free_config(void *conf)
-{
- mp3dec_cmdline_parser_free(conf);
+ return decoder_execute(cmd, pmd->sample_rate, pmd->channels, result);