mirror of
https://github.com/navidrome/navidrome.git
synced 2025-08-10 00:52:20 +00:00
use int instead for windows
This commit is contained in:
@@ -138,7 +138,7 @@ int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id) {
|
||||
if (sampleRate != 0) {
|
||||
hasLyrics = true;
|
||||
for (const auto &line: frame->synchedText()) {
|
||||
const uint timeInMs = (line.time * 1000) / sampleRate;
|
||||
const int timeInMs = (line.time * 1000) / sampleRate;
|
||||
char *text = (char *)line.text.toCString(true);
|
||||
go_map_put_lyric_line(id, lang, text, timeInMs);
|
||||
}
|
||||
|
||||
@@ -118,10 +118,10 @@ func go_map_put_int(id C.ulong, key *C.char, val C.int) {
|
||||
}
|
||||
|
||||
//export go_map_put_lyric_line
|
||||
func go_map_put_lyric_line(id C.ulong, lang *C.char, text *C.char, time C.uint) {
|
||||
func go_map_put_lyric_line(id C.ulong, lang *C.char, text *C.char, time C.int) {
|
||||
language := C.GoString(lang)
|
||||
line := C.GoString(text)
|
||||
timeGo := uint64(time)
|
||||
timeGo := int64(time)
|
||||
|
||||
ms := timeGo % 1000
|
||||
timeGo /= 1000
|
||||
|
||||
@@ -14,7 +14,7 @@ extern "C" {
|
||||
extern void go_map_put_m4a_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_lyric_line(unsigned long id, char *lang, char *text, uint time);
|
||||
extern void go_map_put_lyric_line(unsigned long id, char *lang, char *text, int time);
|
||||
int taglib_read(const FILENAME_CHAR_T *filename, unsigned long id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user