aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-11 14:55:35 -0800
committerChris Robinson <[email protected]>2008-01-11 14:55:35 -0800
commitaa453b4e9e325df3debd65f0d965e8b2b5eb53e3 (patch)
tree58b4a1382decff30ad3030dcca78c6f9e50ae159 /Alc
parentf8089d20262681542dd214da130f4462d6a9eb8b (diff)
Use Sleep instead of usleep
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alsa.c8
-rw-r--r--Alc/oss.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 926ca354..e76b8504 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -116,7 +116,7 @@ static int xrun_recovery(snd_pcm_t *handle, int err)
else if (err == -ESTRPIPE)
{
while ((err = psnd_pcm_resume(handle)) == -EAGAIN)
- usleep(1); /* wait until the suspend flag is released */
+ Sleep(1); /* wait until the suspend flag is released */
if (err < 0)
{
err = psnd_pcm_prepare(handle);
@@ -177,7 +177,7 @@ static ALuint ALSAProc(ALvoid *ptr)
// make sure there's frames to process
if(avail == 0)
{
- usleep(1000);
+ Sleep(1);
continue;
}
@@ -367,7 +367,7 @@ open_alsa:
i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if(i < 0)
{
- usleep(200000);
+ Sleep(200);
i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
}
if(i >= 0)
@@ -552,7 +552,7 @@ open_alsa:
i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
if(i < 0)
{
- usleep(200000);
+ Sleep(200);
i = psnd_pcm_open(&data->pcmHandle, driver, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
}
if(i >= 0)
diff --git a/Alc/oss.c b/Alc/oss.c
index 77fe4192..299146b2 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -105,7 +105,7 @@ static ALuint OSSProc(ALvoid *ptr)
memmove(data->mix_data, data->mix_data+wrote, remaining);
}
else
- usleep(1000);
+ Sleep(1);
}
return 0;
@@ -131,7 +131,7 @@ static ALuint OSSCaptureProc(ALvoid *ptr)
}
if(amt == 0)
{
- usleep(1000);
+ Sleep(1);
continue;
}
if(data->doCapture)