Changeset b7fd2a0 in mainline for uspace/lib/trackmod
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/lib/trackmod
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/trackmod/protracker.c
r36f0738 rb7fd2a0 79 79 * @return EOK on success, EINVAL if tag is not recognized. 80 80 */ 81 static int smp_tag_decode(uint8_t *tag, size_t *channels)81 static errno_t smp_tag_decode(uint8_t *tag, size_t *channels) 82 82 { 83 83 size_t nentries = sizeof(smp_tags) / sizeof(smptag_desc_t); … … 138 138 * @return EOK on success, ENOMEM if out of memory, EIO on I/O error. 139 139 */ 140 static int protracker_load_patterns(FILE *f, trackmod_module_t *module)140 static errno_t protracker_load_patterns(FILE *f, trackmod_module_t *module) 141 141 { 142 142 size_t cells; 143 143 size_t i, j; 144 int rc;144 errno_t rc; 145 145 size_t nread; 146 146 uint32_t *buf = NULL; … … 191 191 * @return EOk on success, ENOMEM if out of memory, EIO on I/O error. 192 192 */ 193 static int protracker_load_samples(FILE *f, protracker_smp_t *smp,193 static errno_t protracker_load_samples(FILE *f, protracker_smp_t *smp, 194 194 trackmod_module_t *module) 195 195 { 196 int rc;196 errno_t rc; 197 197 size_t i; 198 198 uint8_t ftval; … … 256 256 * or if any error is found in the format of the file. 257 257 */ 258 int trackmod_protracker_load(char *fname, trackmod_module_t **rmodule)258 errno_t trackmod_protracker_load(char *fname, trackmod_module_t **rmodule) 259 259 { 260 260 FILE *f = NULL; … … 269 269 size_t i; 270 270 size_t nread; 271 int rc;271 errno_t rc; 272 272 273 273 f = fopen(fname, "rb"); -
uspace/lib/trackmod/protracker.h
r36f0738 rb7fd2a0 39 39 #include "types/trackmod.h" 40 40 41 extern int trackmod_protracker_load(char *, trackmod_module_t **);41 extern errno_t trackmod_protracker_load(char *, trackmod_module_t **); 42 42 43 43 #endif -
uspace/lib/trackmod/trackmod.c
r36f0738 rb7fd2a0 152 152 } 153 153 154 int trackmod_module_load(char *fname, trackmod_module_t **rmodule)155 { 156 int rc;154 errno_t trackmod_module_load(char *fname, trackmod_module_t **rmodule) 155 { 156 errno_t rc; 157 157 158 158 rc = trackmod_xm_load(fname, rmodule); … … 780 780 * @param rmodplay Place to store pointer to module playback object 781 781 */ 782 int trackmod_modplay_create(trackmod_module_t *module,782 errno_t trackmod_modplay_create(trackmod_module_t *module, 783 783 unsigned smp_freq, trackmod_modplay_t **rmodplay) 784 784 { -
uspace/lib/trackmod/trackmod.h
r36f0738 rb7fd2a0 40 40 41 41 extern trackmod_module_t *trackmod_module_new(void); 42 extern int trackmod_module_load(char *, trackmod_module_t **);42 extern errno_t trackmod_module_load(char *, trackmod_module_t **); 43 43 extern void trackmod_module_destroy(trackmod_module_t *); 44 extern int trackmod_modplay_create(trackmod_module_t *, unsigned,44 extern errno_t trackmod_modplay_create(trackmod_module_t *, unsigned, 45 45 trackmod_modplay_t **); 46 46 extern void trackmod_modplay_destroy(trackmod_modplay_t *); -
uspace/lib/trackmod/xm.c
r36f0738 rb7fd2a0 53 53 * @return EOK on success, EIO on format error, ENOMEM if out of memory. 54 54 */ 55 static int trackmod_xm_load_order_list(xm_hdr_t *xm_hdr, trackmod_module_t *module)55 static errno_t trackmod_xm_load_order_list(xm_hdr_t *xm_hdr, trackmod_module_t *module) 56 56 { 57 int rc;57 errno_t rc; 58 58 size_t i; 59 59 … … 94 94 * @return EOK on success, EINVAL if there is error in the coded data. 95 95 */ 96 static int trackmod_xm_decode_pattern(uint8_t *data, size_t dsize,96 static errno_t trackmod_xm_decode_pattern(uint8_t *data, size_t dsize, 97 97 trackmod_pattern_t *pattern) 98 98 { … … 162 162 * @return EOK on success, EIO on format error, ENOMEM if out of memory. 163 163 */ 164 static int trackmod_xm_load_patterns(FILE *f, trackmod_module_t *module)164 static errno_t trackmod_xm_load_patterns(FILE *f, trackmod_module_t *module) 165 165 { 166 166 size_t i; … … 173 173 uint8_t *buf = NULL; 174 174 long seek_amount; 175 int rc;175 errno_t rc; 176 176 int ret; 177 177 … … 281 281 * @return EOK on success, EIO on format error, ENOMEM if out of memory. 282 282 */ 283 static int trackmod_xm_load_instruments(xm_hdr_t *xm_hdr, FILE *f,283 static errno_t trackmod_xm_load_instruments(xm_hdr_t *xm_hdr, FILE *f, 284 284 trackmod_module_t *module) 285 285 { … … 297 297 void *smp_data; 298 298 long pos; 299 int rc;299 errno_t rc; 300 300 int ret; 301 301 … … 422 422 * or if any error is found in the format of the file. 423 423 */ 424 int trackmod_xm_load(char *fname, trackmod_module_t **rmodule)424 errno_t trackmod_xm_load(char *fname, trackmod_module_t **rmodule) 425 425 { 426 426 FILE *f = NULL; … … 429 429 size_t nread; 430 430 size_t hdr_size; 431 int rc;431 errno_t rc; 432 432 433 433 f = fopen(fname, "rb"); -
uspace/lib/trackmod/xm.h
r36f0738 rb7fd2a0 39 39 #include "types/trackmod.h" 40 40 41 extern int trackmod_xm_load(char *, trackmod_module_t **);41 extern errno_t trackmod_xm_load(char *, trackmod_module_t **); 42 42 43 43 #endif
Note:
See TracChangeset
for help on using the changeset viewer.