comparison sidinfo.c @ 319:6d0143e43edf

Add functionality and API changes for doing on-the-fly character set conversion of STIL data and PSID header string fields while reading them.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 11 Jan 2020 20:12:00 +0200
parents f3ba2ba894b1
children e315bed7d791
comparison
equal deleted inserted replaced
318:f3ba2ba894b1 319:6d0143e43edf
989 } 989 }
990 990
991 th_io_set_handlers(inFile, siPSIDError, NULL); 991 th_io_set_handlers(inFile, siPSIDError, NULL);
992 992
993 // Read PSID data 993 // Read PSID data
994 if ((res = sidlib_read_sid_file_alloc(inFile, &psid, setSLDBNewFormat)) != THERR_OK) 994 if ((res = sidlib_read_sid_file_alloc(inFile, &psid, setSLDBNewFormat, NULL)) != THERR_OK)
995 goto error; 995 goto error;
996 996
997 // Get songlength information, if any 997 // Get songlength information, if any
998 if (sidSLDB != NULL) 998 if (sidSLDB != NULL)
999 psid->lengths = sidlib_sldb_get_by_hash(sidSLDB, psid->hash); 999 psid->lengths = sidlib_sldb_get_by_hash(sidSLDB, psid->hash);
1285 THERR("Could not allocate STIL database structure: %s\n", 1285 THERR("Could not allocate STIL database structure: %s\n",
1286 th_error_str(ret)); 1286 th_error_str(ret));
1287 goto err2; 1287 goto err2;
1288 } 1288 }
1289 1289
1290 if ((ret = sidlib_stildb_read(inFile, sidSTILDB)) != THERR_OK) 1290 if ((ret = sidlib_stildb_read(inFile, sidSTILDB, NULL)) != THERR_OK)
1291 { 1291 {
1292 THERR("Error parsing STIL: %s\n", 1292 THERR("Error parsing STIL: %s\n",
1293 th_error_str(ret)); 1293 th_error_str(ret));
1294 goto err2; 1294 goto err2;
1295 } 1295 }