aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:58 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commit7520462bc1eeda2f724ec84ff16338053b728920 (patch)
tree22e564a3c50a2672bbd50315d08265d923689284 /replay
parent1d793fec6cc4b1a6234e70da36be8d6b00aa250b (diff)
audio: use size_t where makes sense
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: c5193e687fc6cc0f60cb3e90fe69ddf2027d0df1.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'replay')
-rw-r--r--replay/replay-audio.c16
-rw-r--r--replay/replay.c2
2 files changed, 9 insertions, 9 deletions
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))