Mercurial > SDL_sound_CoreAudio
comparison decoders/wav.c @ 246:170b1400e060
Cast to prevent pointer arithmatic on a (void *).
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 05 Feb 2002 19:00:39 +0000 |
parents | 12a9c2e0b00f |
children | c97be6e1bd27 |
comparison
equal
deleted
inserted
replaced
245:82a37ef73ae9 | 246:170b1400e060 |
---|---|
455 sample->flags |= SOUND_SAMPLEFLAG_ERROR; | 455 sample->flags |= SOUND_SAMPLEFLAG_ERROR; |
456 return(bw); | 456 return(bw); |
457 } /* if */ | 457 } /* if */ |
458 | 458 |
459 /* only write first sample frame for now. */ | 459 /* only write first sample frame for now. */ |
460 put_adpcm_sample_frame2(internal->buffer + bw, fmt); | 460 put_adpcm_sample_frame2((Uint8 *) internal->buffer + bw, fmt); |
461 fmt->fmt.adpcm.samples_left_in_block--; | 461 fmt->fmt.adpcm.samples_left_in_block--; |
462 bw += fmt->sample_frame_size; | 462 bw += fmt->sample_frame_size; |
463 break; | 463 break; |
464 | 464 |
465 case 1: /* output last sample frame of block... */ | 465 case 1: /* output last sample frame of block... */ |
466 put_adpcm_sample_frame1(internal->buffer + bw, fmt); | 466 put_adpcm_sample_frame1((Uint8 *) internal->buffer + bw, fmt); |
467 fmt->fmt.adpcm.samples_left_in_block--; | 467 fmt->fmt.adpcm.samples_left_in_block--; |
468 bw += fmt->sample_frame_size; | 468 bw += fmt->sample_frame_size; |
469 break; | 469 break; |
470 | 470 |
471 default: /* output latest sample frame and read a new one... */ | 471 default: /* output latest sample frame and read a new one... */ |
472 put_adpcm_sample_frame1(internal->buffer + bw, fmt); | 472 put_adpcm_sample_frame1((Uint8 *) internal->buffer + bw, fmt); |
473 fmt->fmt.adpcm.samples_left_in_block--; | 473 fmt->fmt.adpcm.samples_left_in_block--; |
474 bw += fmt->sample_frame_size; | 474 bw += fmt->sample_frame_size; |
475 | 475 |
476 if (!decode_adpcm_sample_frame(sample)) | 476 if (!decode_adpcm_sample_frame(sample)) |
477 { | 477 { |