Lines Matching refs:format
47 static int InitMS_ADPCM(WaveFMT *format)
53 MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
54 MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
55 MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
56 MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
57 MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
59 SDL_SwapLE16(format->bitspersample);
60 rogue_feel = (Uint8 *)format+sizeof(*format);
61 if ( sizeof(*format) == 16 ) {
225 static int InitIMA_ADPCM(WaveFMT *format)
230 IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
231 IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
232 IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
233 IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
234 IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
236 SDL_SwapLE16(format->bitspersample);
237 rogue_feel = (Uint8 *)format+sizeof(*format);
238 if ( sizeof(*format) == 16 ) {
408 WaveFMT *format = NULL;
434 /* Read the audio data format chunk */
450 /* Decode the audio data format */
451 format = (WaveFMT *)chunk.data;
458 switch (SDL_SwapLE16(format->encoding)) {
464 if ( InitMS_ADPCM(format) < 0 ) {
472 if ( InitIMA_ADPCM(format) < 0 ) {
480 SDL_SwapLE16(format->encoding));
484 SDL_SetError("Unknown WAVE data format: 0x%.4x",
485 SDL_SwapLE16(format->encoding));
490 spec->freq = SDL_SwapLE32(format->frequency);
491 switch (SDL_SwapLE16(format->bitspersample)) {
494 spec->format = AUDIO_S16;
500 spec->format = AUDIO_U8;
503 spec->format = AUDIO_S16;
510 SDL_SetError("Unknown %d-bit PCM data format",
511 SDL_SwapLE16(format->bitspersample));
514 spec->channels = (Uint8)SDL_SwapLE16(format->channels);
549 samplesize = ((spec->format & 0xFF)/8)*spec->channels;
553 if ( format != NULL ) {
554 SDL_free(format);