diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-10-24 18:32:44 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-10-29 11:49:33 +0200 |
commit | cca11553e50760d8cfbfdd1e1af45e31b52417ad (patch) | |
tree | bf40b61a729a571429b93bff9b7230e6aafca55d /src/codecs.c | |
parent | 294db60a4e51568649d7bfccda22dd8ffa0e3f81 (diff) |
codec: Add preliminary codecs definitions for HR/FR/EFR
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/codecs.c')
-rw-r--r-- | src/codecs.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/codecs.c b/src/codecs.c new file mode 100644 index 0000000..7a9a6d3 --- /dev/null +++ b/src/codecs.c @@ -0,0 +1,42 @@ +/* Codecs handling */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdio.h> /* for NULL */ + +#include <gapk/codecs.h> + +/* Extern codec descriptors */ +extern const struct codec_desc codec_pcm_desc; +extern const struct codec_desc codec_hr_desc; +extern const struct codec_desc codec_fr_desc; +extern const struct codec_desc codec_efr_desc; + + +const struct codec_desc * +codec_get_from_type(enum codec_type type) +{ + switch (type) { + case CODEC_PCM: return &codec_pcm_desc; + case CODEC_HR: return &codec_hr_desc; + case CODEC_FR: return &codec_fr_desc; + case CODEC_EFR: return &codec_efr_desc; + default: + return NULL; + } +} |