Mercurial > hg > xmms-sid
comparison src/xs_sidplay.h @ 527:fe8b41abd923
Now everything necessary should be using the VFS functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 20 Feb 2007 18:09:04 +0000 |
parents | fa95d942f226 |
children | eafcd84a8c59 |
comparison
equal
deleted
inserted
replaced
526:fa95d942f226 | 527:fe8b41abd923 |
---|---|
23 | 23 |
24 | 24 |
25 /* This function gets most of the information, though we do miss some | 25 /* This function gets most of the information, though we do miss some |
26 * (those variables that are only set by libSIDPlay when tune is initialized). | 26 * (those variables that are only set by libSIDPlay when tune is initialized). |
27 * Rest of the information is acquired in TFUNCTION2() | 27 * Rest of the information is acquired in TFUNCTION2() |
28 * | |
29 * NOTICE! FIXME?! It might be faster to use a SID-parser of our own here, | |
30 * thought it might make us bit incompatible ... | |
31 */ | 28 */ |
32 t_xs_tuneinfo *TFUNCTION(gchar *sidFilename) | 29 t_xs_tuneinfo *TFUNCTION(gchar *sidFilename) |
33 { | 30 { |
34 t_xs_tuneinfo *pResult; | 31 t_xs_tuneinfo *pResult; |
35 TTUNEINFO myInfo; | 32 TTUNEINFO myInfo; |
36 TTUNE *myTune; | 33 TTUNE *myTune; |
34 guint8 *buf = NULL; | |
35 size_t bufSize = 0; | |
37 | 36 |
37 /* Load file */ | |
38 if (!sidFilename) return NULL; | |
39 | |
40 if (xs_fload_buffer(sidFilename, &buf, &bufSize) != 0) | |
41 return NULL; | |
42 | |
38 /* Check if the tune exists and is readable */ | 43 /* Check if the tune exists and is readable */ |
39 if ((myTune = new TTUNE(sidFilename)) == NULL) | 44 if ((myTune = new TTUNE(buf, bufSize)) == NULL) { |
45 g_free(buf); | |
40 return NULL; | 46 return NULL; |
47 } | |
48 g_free(buf); | |
41 | 49 |
42 if (!myTune->getStatus()) { | 50 if (!myTune->getStatus()) { |
43 delete myTune; | 51 delete myTune; |
44 return NULL; | 52 return NULL; |
45 } | 53 } |