- sound_header = (struct SoundHeader_8SVX *)snd_info->file_ptr;
-
- if (strncmp(sound_header->magic_FORM,"FORM",4) ||
- snd_info->file_len != be2long(&sound_header->chunk_size)+8 ||
- strncmp(sound_header->magic_8SVX,"8SVX",4))
- {
- Error(ERR_WARN, "'%s' is not an IFF/8SVX file or broken - no sounds",
- filename);
- return(FALSE);
- }
-
- ptr = (char *)snd_info->file_ptr + 12;
-
- while(ptr < (char *)(snd_info->file_ptr + snd_info->file_len))
- {
- if (!strncmp(ptr,"VHDR",4))
- {
- ptr += be2long((unsigned long *)(ptr + 4)) + 8;
- continue;
- }
- else if (!strncmp(ptr,"ANNO",4))
- {
- ptr += be2long((unsigned long *)(ptr + 4)) + 8;
- continue;
- }
- else if (!strncmp(ptr,"CHAN",4))
- {
- ptr += be2long((unsigned long *)(ptr + 4)) + 8;
- continue;
- }
- else if (!strncmp(ptr,"BODY",4))
- {
- snd_info->data_ptr = (byte *)ptr + 8;
- snd_info->data_len = be2long((unsigned long *)(ptr + 4));
- return(TRUE);
- }
- else
- {
- /* other chunk not recognized here */
- ptr += be2long((unsigned long *)(ptr + 4)) + 8;
- continue;
- }
- }