diff options
author | Stefan Pöschel <github@basicmaster.de> | 2016-04-24 22:18:56 +0200 |
---|---|---|
committer | Stefan Pöschel <github@basicmaster.de> | 2016-04-24 22:18:56 +0200 |
commit | c1599cb19601443c48c45c5ad8d1b0d40a6238bc (patch) | |
tree | a0be96f911a70b3b91654a4b44f998838afb1f22 /src/utils.c | |
parent | 42546c26517013fc0df6a47743c7734a1ea9ecf8 (diff) | |
download | ODR-AudioEnc-c1599cb19601443c48c45c5ad8d1b0d40a6238bc.tar.gz ODR-AudioEnc-c1599cb19601443c48c45c5ad8d1b0d40a6238bc.tar.bz2 ODR-AudioEnc-c1599cb19601443c48c45c5ad8d1b0d40a6238bc.zip |
DLS: add DL Plus support
- adds support for Dynamic Label Plus to mot-encoder through a new parameter
block which prepends the DLS text within the regarding file
- adds an option to add DL Plus data to the VLC input ICY text of dabplus-enc
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index 0168a23..24da427 100644 --- a/src/utils.c +++ b/src/utils.c @@ -28,3 +28,13 @@ const char* level(int channel, int peak) return text[index][channel]; } +size_t strlen_utf8(const char *s) { + size_t result = 0; + + // ignore continuation bytes - only count single/leading bytes + while (*s) + if ((*s++ & 0xC0) != 0x80) + result++; + + return result; +} |