aboutsummaryrefslogtreecommitdiff
path: root/audio/dsoundaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/dsoundaudio.c')
-rw-r--r--audio/dsoundaudio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c
index 11594c3..2fc118b 100644
--- a/audio/dsoundaudio.c
+++ b/audio/dsoundaudio.c
@@ -454,19 +454,20 @@ static int dsound_ctl_out (HWVoiceOut *hw, int cmd, ...)
return 0;
}
-static int dsound_run_out (HWVoiceOut *hw, int live)
+static size_t dsound_run_out(HWVoiceOut *hw, size_t live)
{
int err;
HRESULT hr;
DSoundVoiceOut *ds = (DSoundVoiceOut *) hw;
LPDIRECTSOUNDBUFFER dsb = ds->dsound_buffer;
- int len, hwshift;
+ size_t len;
+ int hwshift;
DWORD blen1, blen2;
DWORD len1, len2;
DWORD decr;
DWORD wpos, ppos, old_pos;
LPVOID p1, p2;
- int bufsize;
+ size_t bufsize;
dsound *s = ds->s;
AudiodevDsoundOptions *dso = &s->dev->u.dsound;
@@ -533,9 +534,9 @@ static int dsound_run_out (HWVoiceOut *hw, int live)
}
}
- if (audio_bug(__func__, len < 0 || len > bufsize)) {
- dolog ("len=%d bufsize=%d old_pos=%ld ppos=%ld\n",
- len, bufsize, old_pos, ppos);
+ if (audio_bug(__func__, len > bufsize)) {
+ dolog("len=%zu bufsize=%zu old_pos=%ld ppos=%ld\n",
+ len, bufsize, old_pos, ppos);
return 0;
}
@@ -640,13 +641,13 @@ static int dsound_ctl_in (HWVoiceIn *hw, int cmd, ...)
return 0;
}
-static int dsound_run_in (HWVoiceIn *hw)
+static size_t dsound_run_in(HWVoiceIn *hw)
{
int err;
HRESULT hr;
DSoundVoiceIn *ds = (DSoundVoiceIn *) hw;
LPDIRECTSOUNDCAPTUREBUFFER dscb = ds->dsound_capture_buffer;
- int live, len, dead;
+ size_t live, len, dead;
DWORD blen1, blen2;
DWORD len1, len2;
DWORD decr;