diff options
Diffstat (limited to 'lib/rbcodec')
-rw-r--r-- | lib/rbcodec/metadata/metadata.c | 8 | ||||
-rw-r--r-- | lib/rbcodec/metadata/metadata.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/rbcodec/metadata/metadata.c b/lib/rbcodec/metadata/metadata.c index 28cef46d92..670c37fcfd 100644 --- a/lib/rbcodec/metadata/metadata.c +++ b/lib/rbcodec/metadata/metadata.c | |||
@@ -304,6 +304,14 @@ int get_audio_base_codec_type(int type) | |||
304 | return base_type; | 304 | return base_type; |
305 | } | 305 | } |
306 | 306 | ||
307 | const char * get_codec_string(int type) | ||
308 | { | ||
309 | if (type < 0 || type >= AFMT_NUM_CODECS) | ||
310 | type = AFMT_UNKNOWN; | ||
311 | |||
312 | return audio_formats[type].label; | ||
313 | } | ||
314 | |||
307 | /* Get the basic audio type */ | 315 | /* Get the basic audio type */ |
308 | bool rbcodec_format_is_atomic(int afmt) | 316 | bool rbcodec_format_is_atomic(int afmt) |
309 | { | 317 | { |
diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h index a0ba0376c6..ce1b153833 100644 --- a/lib/rbcodec/metadata/metadata.h +++ b/lib/rbcodec/metadata/metadata.h | |||
@@ -333,6 +333,7 @@ void wipe_mp3entry(struct mp3entry *id3); | |||
333 | 333 | ||
334 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); | 334 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); |
335 | int get_audio_base_codec_type(int type); | 335 | int get_audio_base_codec_type(int type); |
336 | const char * get_codec_string(int type); | ||
336 | bool rbcodec_format_is_atomic(int afmt); | 337 | bool rbcodec_format_is_atomic(int afmt); |
337 | bool format_buffers_with_offset(int afmt); | 338 | bool format_buffers_with_offset(int afmt); |
338 | 339 | ||