test/testresample.c
changeset 3018 d706d3170d7d
parent 3017 3272431eeee2
child 3040 62d4992e5a92
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);