make rtlsdr_close() build on win32 again

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Steve Markgraf 2012-09-13 23:27:35 +02:00
parent fc5881d4cd
commit 519406264c

View File

@ -1259,8 +1259,13 @@ int rtlsdr_close(rtlsdr_dev_t *dev)
return -1; return -1;
/* block until all async operations have been completed (if any) */ /* block until all async operations have been completed (if any) */
while (RTLSDR_INACTIVE != dev->async_status) while (RTLSDR_INACTIVE != dev->async_status) {
usleep(10); #ifdef _WIN32
Sleep(1);
#else
usleep(1000);
#endif
}
rtlsdr_deinit_baseband(dev); rtlsdr_deinit_baseband(dev);