Thilo helped me track down the audio issue with 22050 hz stereo sound. Yay! SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Wed, 14 Oct 2009 07:34:35 +0000
branchSDL-1.2
changeset 433677b20871fd44
parent 4335 a1a337237d42
child 4337 4eb6b4be1dbc
Thilo helped me track down the audio issue with 22050 hz stereo sound. Yay!
src/audio/alsa/SDL_alsa_audio.c
     1.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Tue Oct 13 18:14:13 2009 +0000
     1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Wed Oct 14 07:34:35 2009 +0000
     1.3 @@ -317,7 +317,7 @@
     1.4  	int status;
     1.5  	snd_pcm_uframes_t frames_left;
     1.6  	const Uint8 *sample_buf = (const Uint8 *) mixbuf;
     1.7 -	const int sample_size = ((int) (this->spec.format & 0xFF)) / 8;
     1.8 +	const int frame_size = (((int) (this->spec.format & 0xFF)) / 8) * this->spec.channels;
     1.9  
    1.10  	swizzle_alsa_channels(this);
    1.11  
    1.12 @@ -346,7 +346,7 @@
    1.13  			}
    1.14  			continue;
    1.15  		}
    1.16 -		sample_buf += status * sample_size;
    1.17 +		sample_buf += status * frame_size;
    1.18  		frames_left -= status;
    1.19  	}
    1.20  }