mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Merge 30953e7ea7
into e3de03501f
This commit is contained in:
commit
5760fe767e
@ -66,6 +66,8 @@ namespace
|
||||
bool unicodeStrings = true;
|
||||
bool stringManagementEnabled = true;
|
||||
|
||||
const StringList defaultFileExtensions = FileRef::defaultFileExtensions();
|
||||
|
||||
char *stringToCharArray(const String &s)
|
||||
{
|
||||
const std::string str = s.to8Bit(unicodeStrings);
|
||||
@ -370,6 +372,16 @@ int taglib_audioproperties_channels(const TagLib_AudioProperties *audioPropertie
|
||||
return p->channels();
|
||||
}
|
||||
|
||||
const char **taglib_default_file_extensions(unsigned int *size)
|
||||
{
|
||||
*size = defaultFileExtensions.size();
|
||||
const char** dest = (const char**)malloc(*size * sizeof(char*));
|
||||
for(unsigned int i = 0; i < *size; ++i) {
|
||||
dest[i] = defaultFileExtensions[i].toCString();
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
void taglib_id3v2_set_default_text_encoding(TagLib_ID3v2_Encoding encoding)
|
||||
{
|
||||
String::Type type = String::Latin1;
|
||||
|
@ -315,6 +315,13 @@ TAGLIB_C_EXPORT int taglib_audioproperties_samplerate(const TagLib_AudioProperti
|
||||
*/
|
||||
TAGLIB_C_EXPORT int taglib_audioproperties_channels(const TagLib_AudioProperties *audioProperties);
|
||||
|
||||
/*!
|
||||
* Returns the list of file extensions that are used by default.
|
||||
*
|
||||
* \note This array of strings should be freed using taglib_free().
|
||||
*/
|
||||
TAGLIB_C_EXPORT const char **taglib_default_file_extensions(unsigned int *size);
|
||||
|
||||
/*******************************************************************************
|
||||
* Special convenience ID3v2 functions
|
||||
*******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user