comparison src/psf2/plugin.c @ 2747:ead11a126bdd

clean up warnings.
author William Pitcock <nenolod@atheme.org>
date Mon, 30 Jun 2008 23:05:32 -0500
parents aa2e0f33f55d
children fe0d1cff2cd0
comparison
equal deleted inserted replaced
2746:aa2e0f33f55d 2747:ead11a126bdd
53 static char *path; 53 static char *path;
54 54
55 /* ao_get_lib: called to load secondary files */ 55 /* ao_get_lib: called to load secondary files */
56 int ao_get_lib(char *filename, uint8 **buffer, uint64 *length) 56 int ao_get_lib(char *filename, uint8 **buffer, uint64 *length)
57 { 57 {
58 uint8 *filebuf; 58 guchar *filebuf;
59 uint32 size; 59 gsize size;
60 VFSFile *auxfile;
61 char buf[PATH_MAX]; 60 char buf[PATH_MAX];
62 61
63 snprintf(buf, PATH_MAX, "%s/%s", dirname(path), filename); 62 snprintf(buf, PATH_MAX, "%s/%s", dirname(path), filename);
64 63
65 aud_vfs_file_get_contents(buf, &filebuf, &size); 64 aud_vfs_file_get_contents(buf, (gchar **) &filebuf, &size);
66 65
67 *buffer = filebuf; 66 *buffer = filebuf;
68 *length = (uint64)size; 67 *length = (uint64)size;
69 68
70 return AO_SUCCESS; 69 return AO_SUCCESS;
71 } 70 }
72 71
73 void psf2_play(InputPlayback *data) 72 void psf2_play(InputPlayback *data)
74 { 73 {
75 uint8 *buffer; 74 guchar *buffer;
76 uint32 size, filesig; 75 gsize size;
76 uint32 filesig;
77 77
78 path = g_strdup(data->filename); 78 path = g_strdup(data->filename);
79 aud_vfs_file_get_contents(data->filename, &buffer, &size); 79 aud_vfs_file_get_contents(data->filename, (gchar **) &buffer, &size);
80 80
81 // now try to identify the file 81 // now try to identify the file
82 type = 0; 82 type = 0;
83 filesig = buffer[0]<<24 | buffer[1]<<16 | buffer[2]<<8 | buffer[3]; 83 filesig = buffer[0]<<24 | buffer[1]<<16 | buffer[2]<<8 | buffer[3];
84 while (types[type].sig != 0xffffffff) 84 while (types[type].sig != 0xffffffff)