mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
Simplify prototype definition for taglib_read
This commit is contained in:
parent
91b470c93b
commit
48a627885c
2 changed files with 9 additions and 12 deletions
|
@ -17,11 +17,7 @@
|
||||||
|
|
||||||
char has_cover(const TagLib::FileRef f);
|
char has_cover(const TagLib::FileRef f);
|
||||||
|
|
||||||
#ifdef WIN32
|
int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id) {
|
||||||
int taglib_read(const wchar_t *filename, unsigned long id) {
|
|
||||||
#else
|
|
||||||
int taglib_read(const char *filename, unsigned long id) {
|
|
||||||
#endif
|
|
||||||
TagLib::FileRef f(filename, true, TagLib::AudioProperties::Fast);
|
TagLib::FileRef f(filename, true, TagLib::AudioProperties::Fast);
|
||||||
|
|
||||||
if (f.isNull()) {
|
if (f.isNull()) {
|
||||||
|
|
|
@ -5,15 +5,16 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define FILENAME_CHAR_T wchar_t
|
||||||
|
#else
|
||||||
|
#define FILENAME_CHAR_T char
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void go_map_put_str(unsigned long id, char *key, char *val);
|
extern void go_map_put_str(unsigned long id, char *key, char *val);
|
||||||
extern void go_map_put_int(unsigned long id, char *key, int val);
|
extern void go_map_put_int(unsigned long id, char *key, int val);
|
||||||
|
int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id);
|
||||||
#ifdef WIN32
|
|
||||||
int taglib_read(const wchar_t *filename, unsigned long id);
|
|
||||||
#else
|
|
||||||
int taglib_read(const char *filename, unsigned long id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue