mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 21:50:33 +00:00
The replay infrastructure shouldn't depend on internals of audio/. (st_sample is an internal implementation detail and could be different) Let audio drive the audio samples recording/replaying. Notice also we don't need to save & restore the internal ring "wpos", all replay should care about is the number of samples and the samples. Bump the replay version. Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
70 lines
1.3 KiB
C
70 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/*
|
|
* Stubs for audio test - provides missing functions for standalone audio test
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "qemu/dbus.h"
|
|
#include "ui/qemu-spice-module.h"
|
|
#include "ui/dbus-module.h"
|
|
#include "system/replay.h"
|
|
#include "system/runstate.h"
|
|
|
|
int using_spice;
|
|
int using_dbus_display;
|
|
|
|
struct QemuSpiceOps qemu_spice;
|
|
|
|
GQuark dbus_display_error_quark(void)
|
|
{
|
|
return g_quark_from_static_string("dbus-display-error-quark");
|
|
}
|
|
|
|
#ifdef WIN32
|
|
/* from ui/dbus.h */
|
|
bool
|
|
dbus_win32_import_socket(GDBusMethodInvocation *invocation,
|
|
GVariant *arg_listener, int *socket);
|
|
|
|
bool
|
|
dbus_win32_import_socket(GDBusMethodInvocation *invocation,
|
|
GVariant *arg_listener, int *socket)
|
|
{
|
|
return true;
|
|
}
|
|
#endif
|
|
|
|
void replay_audio_out(size_t *played)
|
|
{
|
|
}
|
|
|
|
void replay_audio_in_start(size_t *nsamples)
|
|
{
|
|
}
|
|
|
|
void replay_audio_in_sample_lr(uint64_t *left, uint64_t *right)
|
|
{
|
|
}
|
|
|
|
void replay_audio_in_finish(void)
|
|
{
|
|
}
|
|
|
|
static int dummy_vmse;
|
|
|
|
VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
|
|
void *opaque)
|
|
{
|
|
return (VMChangeStateEntry *)&dummy_vmse;
|
|
}
|
|
|
|
void qemu_del_vm_change_state_handler(VMChangeStateEntry *e)
|
|
{
|
|
}
|
|
|
|
bool runstate_is_running(void)
|
|
{
|
|
return true;
|
|
}
|