aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-08-21 15:18:50 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-08-21 15:18:50 +0100
commit33f18cf7dca7741d3647d514040904ce83edd73d (patch)
tree6b4d7d07672dac3fd63a0846a59468adee9f504a /replay
parente65472c7bc413d79faa61eb1d05c540b03945894 (diff)
parente76ba19a1f1377314573a6df7e2d82b597aa3d0a (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190821-pull-request' into staging
audio: second batch of -audiodev support, adding support for multiple backends. # gpg: Signature made Wed 21 Aug 2019 09:40:37 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/audio-20190821-pull-request: audio: fix memory leak reported by ASAN audio: use size_t where makes sense audio: remove read and write pcm_ops paaudio: fix playback glitches audio: do not run each backend in audio_run audio: remove audio_MIN, audio_MAX paaudio: properly disconnect streams in fini_* paaudio: do not move stream when sink/source name is specified audio: audiodev= parameters no longer optional when -audiodev present paaudio: prepare for multiple audiodev audio: add audiodev properties to frontends audio: add audiodev property to vnc and wav_capture audio: basic support for multi backend audio audio: reduce glob_audio_state usage audio: Add missing fall through comments Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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 e540d795a8..713395b33d 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))