audio/ is now converted to use QEMU standard trace & error reporting.
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
#include "trace.h"
#include "trace/control.h"
-#define AUDIO_CAP "audio"
#include "audio_int.h"
#define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
g_assert_not_reached();
}
-void AUD_vlog (const char *cap, const char *fmt, va_list ap)
-{
- if (cap) {
- fprintf(stderr, "%s: ", cap);
- }
-
- vfprintf(stderr, fmt, ap);
-}
-
-void AUD_log (const char *cap, const char *fmt, ...)
-{
- va_list ap;
-
- va_start (ap, fmt);
- AUD_vlog (cap, fmt, ap);
- va_end (ap);
-}
-
static char *audsettings_to_string(const struct audsettings *as)
{
return g_strdup_printf("frequency=%d nchannels=%d fmt=%s endian=%s",
#include "qemu/audio-capture.h"
#include "mixeng.h"
-void G_GNUC_PRINTF(2, 0)
-AUD_vlog(const char *cap, const char *fmt, va_list ap);
-
-void G_GNUC_PRINTF(2, 3)
-AUD_log(const char *cap, const char *fmt, ...);
-
struct audio_callback {
void *opaque;
audio_callback_fn fn;
return pos >= dist ? pos - dist : len - dist + pos;
}
-#define dolog(fmt, ...) AUD_log(AUDIO_CAP, fmt, ## __VA_ARGS__)
-
-#ifdef DEBUG
-#define ldebug(fmt, ...) AUD_log(AUDIO_CAP, fmt, ## __VA_ARGS__)
-#else
-#define ldebug(fmt, ...) (void)0
-#endif
-
AudiodevPerDirectionOptions *audio_get_pdo_in(Audiodev *dev);
AudiodevPerDirectionOptions *audio_get_pdo_out(Audiodev *dev);
/* f_fe_min = ceil(1 [frames] * f_be [Hz] / size_be [frames]) */
f_fe_min = (f_be + HWBUF.size - 1) / HWBUF.size;
qemu_log_mask(LOG_UNIMP,
- AUDIO_CAP ": The guest selected a " NAME " sample rate"
+ "audio: The guest selected a " NAME " sample rate"
" of %d Hz for %s. Only sample rates >= %" PRIu64 " Hz"
" are supported.\n",
sw->info.freq, sw->name, f_fe_min);
#include "qemu/bswap.h"
#include "qemu/audio.h"
-#define AUDIO_CAP "mixeng"
#include "audio_int.h"
#ifdef FLOAT_MIXENG
#include "qemu/error-report.h"