Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Disk audio target was using this->hidden->mixlen before we set it.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 7, 2013
1 parent 12026a9 commit bd5ec14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/audio/disk/SDL_diskaudio.c
Expand Up @@ -114,6 +114,10 @@ DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
}
SDL_memset(this->hidden, 0, sizeof(*this->hidden));

this->hidden->mixlen = this->spec.size;
this->hidden->write_delay =
(envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;

/* Open the audio device */
this->hidden->output = SDL_RWFromFile(fname, "wb");
if (this->hidden->output == NULL) {
Expand All @@ -129,10 +133,6 @@ DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
}
SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);

this->hidden->mixlen = this->spec.size;
this->hidden->write_delay =
(envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;

#if HAVE_STDIO_H
fprintf(stderr,
"WARNING: You are using the SDL disk writer audio driver!\n"
Expand Down

0 comments on commit bd5ec14

Please sign in to comment.