comparison test/testresample.c @ 3018:d706d3170d7d

testresample.c: Write out correct size for resampled buffer.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 11 Jan 2009 04:29:36 +0000
parents 3272431eeee2
children 62d4992e5a92
comparison
equal deleted inserted replaced
3017:3272431eeee2 3018:d706d3170d7d
88 SDL_WriteLE32(io, cvtfreq); /* sample rate */ 88 SDL_WriteLE32(io, cvtfreq); /* sample rate */
89 SDL_WriteLE32(io, avgbytes); /* average bytes per second */ 89 SDL_WriteLE32(io, avgbytes); /* average bytes per second */
90 SDL_WriteLE16(io, blockalign); /* block align */ 90 SDL_WriteLE16(io, blockalign); /* block align */
91 SDL_WriteLE16(io, bitsize); /* significant bits per sample */ 91 SDL_WriteLE16(io, bitsize); /* significant bits per sample */
92 SDL_WriteLE32(io, 0x61746164); /* data */ 92 SDL_WriteLE32(io, 0x61746164); /* data */
93 SDL_WriteLE32(io, len * cvt.len_mult); /* size */ 93 SDL_WriteLE32(io, cvt.len_cvt); /* size */
94 SDL_RWwrite(io, cvt.buf, len * cvt.len_mult, 1); 94 SDL_RWwrite(io, cvt.buf, cvt.len_cvt, 1);
95 95
96 if (SDL_RWclose(io) == -1) 96 if (SDL_RWclose(io) == -1)
97 { 97 {
98 fprintf(stderr, "fclose('%s') failed: %s\n", argv[2], SDL_GetError()); 98 fprintf(stderr, "fclose('%s') failed: %s\n", argv[2], SDL_GetError());
99 free(cvt.buf); 99 free(cvt.buf);