Lines Matching defs:SDS_BLOCK_SIZE

36 #define SDS_BLOCK_SIZE				127
55 unsigned char read_data [SDS_BLOCK_SIZE] ;
56 int read_samples [SDS_BLOCK_SIZE / 2] ; /* Maximum samples per block */
60 unsigned char write_data [SDS_BLOCK_SIZE] ;
61 int write_samples [SDS_BLOCK_SIZE / 2] ; /* Maximum samples per block */
289 psf_fseek (psf, SDS_BLOCK_SIZE - 2, SEEK_CUR) ;
290 bytesread += SDS_BLOCK_SIZE - 2 ;
362 psf_fseek (psf, -1 * SDS_BLOCK_SIZE, SEEK_CUR) ;
408 psf->datalength = psds->write_block * SDS_BLOCK_SIZE ;
434 if ((k = (int) psf_fread (psds->read_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
435 psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, SDS_BLOCK_SIZE) ;
446 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
451 if (checksum != psds->read_data [SDS_BLOCK_SIZE - 2])
452 { psf_log_printf (psf, "Block %d : checksum is %02X should be %02X\n", psds->read_data [4], checksum, psds->read_data [SDS_BLOCK_SIZE - 2]) ;
478 if ((k = (int) psf_fread (psds->read_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
479 psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, SDS_BLOCK_SIZE) ;
490 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
495 if (checksum != psds->read_data [SDS_BLOCK_SIZE - 2])
496 { psf_log_printf (psf, "Block %d : checksum is %02X should be %02X\n", psds->read_data [4], checksum, psds->read_data [SDS_BLOCK_SIZE - 2]) ;
522 if ((k = (int) psf_fread (psds->read_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
523 psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, SDS_BLOCK_SIZE) ;
534 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
539 if (checksum != psds->read_data [SDS_BLOCK_SIZE - 2])
540 { psf_log_printf (psf, "Block %d : checksum is %02X should be %02X\n", psds->read_data [4], checksum, psds->read_data [SDS_BLOCK_SIZE - 2]) ;
718 file_offset = psf->dataoffset + newblock * SDS_BLOCK_SIZE ;
736 file_offset = psf->dataoffset + newblock * SDS_BLOCK_SIZE ;
790 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
794 psds->write_data [SDS_BLOCK_SIZE - 2] = checksum ;
795 psds->write_data [SDS_BLOCK_SIZE - 1] = 0xF7 ;
797 if ((k = (int) psf_fwrite (psds->write_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
798 psf_log_printf (psf, "*** Warning : psf_fwrite (%d != %d).\n", k, SDS_BLOCK_SIZE) ;
832 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
836 psds->write_data [SDS_BLOCK_SIZE - 2] = checksum ;
837 psds->write_data [SDS_BLOCK_SIZE - 1] = 0xF7 ;
839 if ((k = (int) psf_fwrite (psds->write_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
840 psf_log_printf (psf, "*** Warning : psf_fwrite (%d != %d).\n", k, SDS_BLOCK_SIZE) ;
875 for (k = 2 ; k <= SDS_BLOCK_SIZE - 3 ; k ++)
879 psds->write_data [SDS_BLOCK_SIZE - 2] = checksum ;
880 psds->write_data [SDS_BLOCK_SIZE - 1] = 0xF7 ;
882 if ((k = (int) psf_fwrite (psds->write_data, 1, SDS_BLOCK_SIZE, psf)) != SDS_BLOCK_SIZE)
883 psf_log_printf (psf, "*** Warning : psf_fwrite (%d != %d).\n", k, SDS_BLOCK_SIZE) ;