aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/null.c6
-rw-r--r--Alc/backends/oss.c4
-rw-r--r--Alc/backends/pulseaudio.c2
-rw-r--r--Alc/backends/solaris.c2
-rw-r--r--Alc/backends/wave.c6
5 files changed, 10 insertions, 10 deletions
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index 4a3aa2d2..26e63b2e 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -94,9 +94,9 @@ static int ALCnullBackend_mixerProc(void *ptr)
}
if(avail-done < device->UpdateSize)
{
- ALuint restTime = (ALuint)((device->UpdateSize - (avail-done)) * 1000 /
- device->Frequency);
- Sleep(restTime);
+ long restTime = (long)((device->UpdateSize - (avail-done)) * 1000000000 /
+ device->Frequency);
+ al_nssleep(0, restTime);
continue;
}
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index bf54bb4c..2a4e4dd3 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -131,7 +131,7 @@ static int ALCplaybackOSS_mixerProc(void *ptr)
break;
}
- Sleep(1);
+ al_nssleep(0, 1000000);
continue;
}
@@ -362,7 +362,7 @@ static int ALCcaptureOSS_recordProc(void *ptr)
}
if(amt == 0)
{
- Sleep(1);
+ al_nssleep(0, 1000000);
continue;
}
if(self->doCapture)
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index 6b7b00a3..8bc147a8 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -783,7 +783,7 @@ static int ALCpulsePlayback_mixerProc(void *ptr)
if(o) pa_operation_unref(o);
}
pa_threaded_mainloop_unlock(self->loop);
- Sleep(1);
+ al_nssleep(0, 1000000);
pa_threaded_mainloop_lock(self->loop);
continue;
}
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c
index 0498ef30..7a8c23d2 100644
--- a/Alc/backends/solaris.c
+++ b/Alc/backends/solaris.c
@@ -86,7 +86,7 @@ static int SolarisProc(void *ptr)
break;
}
- Sleep(1);
+ al_nssleep(0, 1000000);
continue;
}
diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c
index 3d15cab1..5f5c92c1 100644
--- a/Alc/backends/wave.c
+++ b/Alc/backends/wave.c
@@ -93,8 +93,8 @@ static int WaveProc(void *ptr)
ALuint now, start;
ALuint64 avail, done;
size_t fs;
- const ALuint restTime = (ALuint64)Device->UpdateSize * 1000 /
- Device->Frequency / 2;
+ const long restTime = (long)((ALuint64)Device->UpdateSize * 1000000000 /
+ Device->Frequency / 2);
SetThreadName(MIXER_THREAD_NAME);
@@ -116,7 +116,7 @@ static int WaveProc(void *ptr)
}
if(avail-done < Device->UpdateSize)
{
- Sleep(restTime);
+ al_nssleep(0, restTime);
continue;
}