Home | History | Annotate | Download | only in src

Lines Matching full:chunk

58  *  data - descriptor for the "data" chunk
361 { /* skip this non-RIFF chunk */
401 //GS_SetResult(res,"RIFF chunk not found",GS_STATIC);
405 //if(feof(f)) GS_SetResult(res,"RIFF chunk not found",GS_STATIC);
418 { /* skip this non-LIST chunk */
460 ChunkContext chunk, list_chunk;
465 strncpy(chunk.tag, "swi ", 4);
466 if (riffDescend(f, &chunk, parent, FIND_LIST, doSwap) == ESR_SUCCESS)
470 if (riffDescend(f, &list_chunk, &chunk, FIND_CHUNK, doSwap) == ESR_SUCCESS)
497 if (riffDescend(f, &list_chunk, &chunk, FIND_CHUNK, doSwap) == ESR_SUCCESS)
559 ChunkContext chunk, parent;
566 /* find the WAVE chunk */
575 strncpy(chunk.tag, "fmt ", 4);
576 if (riffDescend(f, &chunk, &parent, FIND_CHUNK, doSwap) != ESR_SUCCESS)
578 //GS_AppendResult(res,"\nwaveform audio file has no \"fmt \" chunk.",NULL);
581 if (chunk.length < sizeof(WaveFormat))
584 wf = MALLOC(chunk.length, MTAG);
586 if (fread(wf, 1, chunk.length, f) != (size_t)chunk.length)
589 //GS_SetResult(res,"fmt chunk read failed.",GS_STATIC);
595 /* data chunk */
596 if (riffAscend(f, &chunk) != ESR_SUCCESS)
600 strncpy(chunk.tag, "data", 4);
601 if (riffDescend(f, &chunk, &parent, FIND_CHUNK, doSwap) != ESR_SUCCESS)
603 //GS_AppendResult(res,"\nwaveform audio file has no \"data\" chunk.",NULL);
606 cb = MALLOC(chunk.length, MTAG); /* waveform */
607 if (fread(cb, 1, chunk.length, f) != (size_t)chunk.length)
611 //GS_SetResult(res,"truncated \"data\" chunk",GS_STATIC);
630 rc = (WaveCodecs[i].func)(wf, &chunk, cb, samples, length, doSwap);
674 * If swichunk==NULL, does not look for swi-specific chunk,
681 ChunkContext chunk, parent;
695 /* find the WAVE chunk */
703 strncpy(chunk.tag, "fmt ", 4);
704 if (riffDescend(f, &chunk, &parent, FIND_CHUNK, doSwap) != ESR_SUCCESS)
708 if (chunk.length < sizeof(WaveFormat))
711 wf = MALLOC(chunk.length, MTAG);
713 if (fread(wf, 1, chunk.length, f) != (size_t)chunk.length)
732 /* data chunk */
733 if (riffAscend(f, &chunk) != ESR_SUCCESS)
739 strncpy(chunk.tag, "data", 4);
740 if (riffDescend(f, &chunk, &parent, FIND_CHUNK, doSwap) != ESR_SUCCESS)
746 *num_bytes = chunk.length; /* already swapped, if need be */
747 *waveform = CALLOC(chunk.length, 1, MTAG);
748 if (fread(*waveform, 1, chunk.length, f) != (size_t)chunk.length)
756 short_byte_swap((short *)*waveform, chunk.length);
758 int_byte_swap((int *)*waveform, chunk.length);
936 * OUTPUT: buf (entire riff chunk) and buflen
988 listChunkSize = chunkInfoSize /* LIST chunk info */ + 4 * sizeof(char); /* "swi " */