taglib wchar support
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
_TagLib_AudioProperties-pointer
|
_TagLib_AudioProperties-pointer
|
||||||
|
|
||||||
taglib_file_new
|
taglib_file_new
|
||||||
|
taglib_file_new_wchar
|
||||||
taglib_file_new_type
|
taglib_file_new_type
|
||||||
taglib_file_is_valid
|
taglib_file_is_valid
|
||||||
taglib_file_free
|
taglib_file_free
|
||||||
@@ -106,6 +107,10 @@
|
|||||||
(define-tag-c-lib taglib_file_new
|
(define-tag-c-lib taglib_file_new
|
||||||
(_fun _string/utf-8 -> _TagLib_File-pointer ))
|
(_fun _string/utf-8 -> _TagLib_File-pointer ))
|
||||||
|
|
||||||
|
; TAGLIB_C_EXPORT TagLib_File *taglib_file_new_wchar(const wchar_t *filename);
|
||||||
|
(define-tag-c-lib taglib_file_new_wchar
|
||||||
|
(_fun _string/utf-16 -> _TagLib_File-pointer ))
|
||||||
|
|
||||||
; TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type);
|
; TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type);
|
||||||
(define-tag-c-lib taglib_file_new_type
|
(define-tag-c-lib taglib_file_new_type
|
||||||
(_fun _string/utf-8 TagLib_File_Type -> _TagLib_File-pointer))
|
(_fun _string/utf-8 TagLib_File_Type -> _TagLib_File-pointer))
|
||||||
|
|||||||
+13
@@ -73,6 +73,19 @@
|
|||||||
(if (eq? tag-file #f)
|
(if (eq? tag-file #f)
|
||||||
(set! valid? #f)
|
(set! valid? #f)
|
||||||
(set! valid? (taglib_file_is_valid tag-file)))
|
(set! valid? (taglib_file_is_valid tag-file)))
|
||||||
|
|
||||||
|
(unless valid?
|
||||||
|
(when (eq? (system-type 'os) 'windows)
|
||||||
|
(set! tag-file (taglib_file_new_wchar file))
|
||||||
|
(if (eq? tag-file #f)
|
||||||
|
(set! valid? #f)
|
||||||
|
(set! valid? (taglib_file_is_valid tag-file)))))
|
||||||
|
|
||||||
|
(unless valid?
|
||||||
|
(unless (eq? tag-file #f)
|
||||||
|
(taglib_file_free tag-file)
|
||||||
|
(set! tag-file #f)))
|
||||||
|
|
||||||
(when valid?
|
(when valid?
|
||||||
(let ((tag (taglib_file_tag tag-file))
|
(let ((tag (taglib_file_tag tag-file))
|
||||||
(ap (taglib_file_audioproperties tag-file))
|
(ap (taglib_file_audioproperties tag-file))
|
||||||
|
|||||||
Reference in New Issue
Block a user