Disk audio target was using this->hidden->mixlen before we set it.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 07 Jul 2013 02:04:19 -0400
changeset 736638c6f26bb010
parent 7365 a3fc9175306d
child 7367 d6eabafa8776
Disk audio target was using this->hidden->mixlen before we set it.
src/audio/disk/SDL_diskaudio.c
     1.1 --- a/src/audio/disk/SDL_diskaudio.c	Sun Jul 07 02:03:50 2013 -0400
     1.2 +++ b/src/audio/disk/SDL_diskaudio.c	Sun Jul 07 02:04:19 2013 -0400
     1.3 @@ -114,6 +114,10 @@
     1.4      }
     1.5      SDL_memset(this->hidden, 0, sizeof(*this->hidden));
     1.6  
     1.7 +    this->hidden->mixlen = this->spec.size;
     1.8 +    this->hidden->write_delay =
     1.9 +        (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
    1.10 +
    1.11      /* Open the audio device */
    1.12      this->hidden->output = SDL_RWFromFile(fname, "wb");
    1.13      if (this->hidden->output == NULL) {
    1.14 @@ -129,10 +133,6 @@
    1.15      }
    1.16      SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
    1.17  
    1.18 -    this->hidden->mixlen = this->spec.size;
    1.19 -    this->hidden->write_delay =
    1.20 -        (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
    1.21 -
    1.22  #if HAVE_STDIO_H
    1.23      fprintf(stderr,
    1.24              "WARNING: You are using the SDL disk writer audio driver!\n"