medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit eb49a7b4e8ead35912911dd99e1268c1529555ea
parent 817038f43b95090e2223ae1814878d0f00fdad61
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Sep 14 22:31:18 +0100

Rewrite confusing loop

Diffstat:
linux_audio_output.cc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux_audio_output.cc b/linux_audio_output.cc @@ -102,7 +102,8 @@ void audio_output_close( AudioOutputDevice * device ) { } void audio_output_write( AudioOutputDevice * device, s16 * samples, size_t num_samples ) { - for( u32 i = 0; i < num_samples; ) { + u32 i = 0; + while( i < num_samples ) { s16 * channels[ 2 ] = { samples + i, samples + i }; snd_pcm_sframes_t written = _snd_pcm_writen( device->pcm, ( void ** ) channels, num_samples - i );