use int instead for windows

This commit is contained in:
Kendall Garner
2023-12-03 16:47:59 -08:00
parent ce0ad4a04b
commit 894f2bf410
3 changed files with 4 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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