Fixed number of samples returned.
authorArmin Novak <armin.novak@thincast.com>
Wed, 18 Jul 2018 10:33:52 +0000 (12:33 +0200)
committerArmin Novak <armin.novak@thincast.com>
Wed, 18 Jul 2018 10:33:52 +0000 (12:33 +0200)
channels/audin/client/alsa/audin_alsa.c

index d07def6..4f9b986 100644 (file)
@@ -125,7 +125,6 @@ static DWORD WINAPI audin_alsa_thread_func(LPVOID arg)
        snd_pcm_t* capture_handle = NULL;
        AudinALSADevice* alsa = (AudinALSADevice*) arg;
        DWORD status;
-       size_t rest = 0;
        WLog_Print(alsa->log, WLOG_DEBUG, "in");
 
        if ((error = snd_pcm_open(&capture_handle, alsa->device_name,
@@ -166,17 +165,6 @@ static DWORD WINAPI audin_alsa_thread_func(LPVOID arg)
                if (status == WAIT_OBJECT_0)
                        break;
 
-               if (rest > 0)
-               {
-                       frames += rest;
-                       rest = 0;
-               }
-               else
-               {
-                       rest = frames % alsa->aformat.nBlockAlign;
-                       frames -= rest;
-               }
-
                error = snd_pcm_readi(capture_handle, buffer, frames);
 
                if (error == 0)