Commit 57a878ed authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Gerd Hoffmann
Browse files

audio: Let capture_callback handler use const buffer argument



The buffer is the captured input to pass to backends.
As we should not modify it, mark the argument const.

Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200505132603.8575-3-f4bug@amsat.org>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent e709d2ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ typedef enum {

struct audio_capture_ops {
    void (*notify) (void *opaque, audcnotification_e cmd);
    void (*capture) (void *opaque, void *buf, int size);
    void (*capture) (void *opaque, const void *buf, int size);
    void (*destroy) (void *opaque);
};

+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static void wav_destroy (void *opaque)
    g_free (wav->path);
}

static void wav_capture (void *opaque, void *buf, int size)
static void wav_capture(void *opaque, const void *buf, int size)
{
    WAVState *wav = opaque;

+1 −1
Original line number Diff line number Diff line
@@ -1177,7 +1177,7 @@ static void audio_capture_destroy(void *opaque)
{
}

static void audio_capture(void *opaque, void *buf, int size)
static void audio_capture(void *opaque, const void *buf, int size)
{
    VncState *vs = opaque;