From 7520462bc1eeda2f724ec84ff16338053b728920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Mon, 19 Aug 2019 01:06:58 +0200 Subject: audio: use size_t where makes sense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kővágó, Zoltán Message-id: c5193e687fc6cc0f60cb3e90fe69ddf2027d0df1.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann --- replay/replay-audio.c | 16 ++++++++-------- replay/replay.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'replay') diff --git a/replay/replay-audio.c b/replay/replay-audio.c index 178094e601..91854f02ea 100644 --- a/replay/replay-audio.c +++ b/replay/replay-audio.c @@ -15,18 +15,18 @@ #include "replay-internal.h" #include "audio/audio.h" -void replay_audio_out(int *played) +void replay_audio_out(size_t *played) { if (replay_mode == REPLAY_MODE_RECORD) { g_assert(replay_mutex_locked()); replay_save_instructions(); replay_put_event(EVENT_AUDIO_OUT); - replay_put_dword(*played); + replay_put_qword(*played); } else if (replay_mode == REPLAY_MODE_PLAY) { g_assert(replay_mutex_locked()); replay_account_executed_instructions(); if (replay_next_event_is(EVENT_AUDIO_OUT)) { - *played = replay_get_dword(); + *played = replay_get_qword(); replay_finish_event(); } else { error_report("Missing audio out event in the replay log"); @@ -35,7 +35,7 @@ void replay_audio_out(int *played) } } -void replay_audio_in(int *recorded, void *samples, int *wpos, int size) +void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t size) { int pos; uint64_t left, right; @@ -43,8 +43,8 @@ void replay_audio_in(int *recorded, void *samples, int *wpos, int size) g_assert(replay_mutex_locked()); replay_save_instructions(); replay_put_event(EVENT_AUDIO_IN); - replay_put_dword(*recorded); - replay_put_dword(*wpos); + replay_put_qword(*recorded); + replay_put_qword(*wpos); for (pos = (*wpos - *recorded + size) % size ; pos != *wpos ; pos = (pos + 1) % size) { audio_sample_to_uint64(samples, pos, &left, &right); @@ -55,8 +55,8 @@ void replay_audio_in(int *recorded, void *samples, int *wpos, int size) g_assert(replay_mutex_locked()); replay_account_executed_instructions(); if (replay_next_event_is(EVENT_AUDIO_IN)) { - *recorded = replay_get_dword(); - *wpos = replay_get_dword(); + *recorded = replay_get_qword(); + *wpos = replay_get_qword(); for (pos = (*wpos - *recorded + size) % size ; pos != *wpos ; pos = (pos + 1) % size) { left = replay_get_qword(); diff --git a/replay/replay.c b/replay/replay.c index 0c4e9c1318..7fc9891d2e 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -22,7 +22,7 @@ /* Current version of the replay mechanism. Increase it when file format changes. */ -#define REPLAY_VERSION 0xe02007 +#define REPLAY_VERSION 0xe02008 /* Size of replay log header */ #define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) -- cgit v1.2.3