Mercurial > hg > dmlib
comparison minijss/jloadjss.c @ 1316:817a4d0c70b5
Comment clarifications.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 20 Aug 2017 01:55:09 +0300 |
parents | 4670907412e7 |
children | c0479e984242 |
comparison
equal
deleted
inserted
replaced
1315:7687412f9aef | 1316:817a4d0c70b5 |
---|---|
623 { | 623 { |
624 int ret; | 624 int ret; |
625 size_t bsize = (inst->flags & jsf16bit) ? sizeof(Uint16) : sizeof(Uint8); | 625 size_t bsize = (inst->flags & jsf16bit) ? sizeof(Uint16) : sizeof(Uint8); |
626 bsize *= inst->size; | 626 bsize *= inst->size; |
627 | 627 |
628 // Allocate | 628 // Allocate sample data memory |
629 if ((inst->data = dmMalloc(bsize)) == NULL) | 629 if ((inst->data = dmMalloc(bsize)) == NULL) |
630 { | 630 { |
631 JSSERROR(DMERR_MALLOC, DMERR_MALLOC, | 631 JSSERROR(DMERR_MALLOC, DMERR_MALLOC, |
632 "Could not allocate %d bytes of sample data #%d\n", | 632 "Could not allocate %d bytes of sample data #%d\n", |
633 bsize, index); | 633 bsize, index); |
634 } | 634 } |
635 | 635 |
636 // Copy data | 636 // Read data |
637 if (!dmf_read_str(inFile, inst->data, bsize)) | 637 if (!dmf_read_str(inFile, inst->data, bsize)) |
638 { | 638 { |
639 JSSERROR(DMERR_FREAD, DMERR_FREAD, | 639 JSSERROR(DMERR_FREAD, DMERR_FREAD, |
640 "Could not read %d bytes of sample data for #%d\n", | 640 "Could not read %d bytes of sample data for #%d\n", |
641 bsize, index); | 641 bsize, index); |