Mercurial > SDL_sound_CoreAudio
comparison decoders/shn.c @ 477:3e705c9180e5
Fixed binary compatibility, added Sound_GetDuration().
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 12 May 2004 02:15:00 +0000 |
parents | c66080364dff |
children | 2df1f5c62d38 |
comparison
equal
deleted
inserted
replaced
475:f0b8865577db | 477:3e705c9180e5 |
---|---|
578 BAIL_IF_MACRO(!verb_ReadLE16(shn, rw, &u16), NULL, 0); /* bitspersample */ | 578 BAIL_IF_MACRO(!verb_ReadLE16(shn, rw, &u16), NULL, 0); /* bitspersample */ |
579 | 579 |
580 BAIL_IF_MACRO(!verb_ReadLE32(shn, rw, &u32), NULL, 0); /* 'data' header */ | 580 BAIL_IF_MACRO(!verb_ReadLE32(shn, rw, &u32), NULL, 0); /* 'data' header */ |
581 BAIL_IF_MACRO(u32 != dataID, "SHN: No 'data' header.", 0); | 581 BAIL_IF_MACRO(u32 != dataID, "SHN: No 'data' header.", 0); |
582 BAIL_IF_MACRO(!verb_ReadLE32(shn, rw, &u32), NULL, 0); /* chunksize */ | 582 BAIL_IF_MACRO(!verb_ReadLE32(shn, rw, &u32), NULL, 0); /* chunksize */ |
583 sample->total_time = u32 / bytes_per_second * 1000; | 583 internal->total_time = u32 / bytes_per_second * 1000; |
584 sample->total_time += (u32 % bytes_per_second) * 1000 / bytes_per_second; | 584 internal->total_time += (u32 % bytes_per_second) * 1000 / bytes_per_second; |
585 return(1); | 585 return(1); |
586 } /* parse_riff_header */ | 586 } /* parse_riff_header */ |
587 | 587 |
588 | 588 |
589 static int SHN_open(Sound_Sample *sample, const char *ext) | 589 static int SHN_open(Sound_Sample *sample, const char *ext) |