aboutsummaryrefslogtreecommitdiff
path: root/audio/wavcapture.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:47 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commitecd97e9592fefc5083f0d70fefadd42a1742a65f (patch)
tree470a0a7996a79b72fb864d0a26c6df3200b762f8 /audio/wavcapture.c
parent526fb0581e1164ccf5e6d1a81b5da538594ae4d6 (diff)
audio: basic support for multi backend audio
Audio functions no longer access glob_audio_state, instead they get an AudioState as a parameter. This is required in order to support multiple backends. glob_audio_state is also gone, and replaced with a tailq so we can store more than one states. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 67aef54f9e729a7160fe95c465351115e392164b.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/wavcapture.c')
-rw-r--r--audio/wavcapture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/wavcapture.c b/audio/wavcapture.c
index 493edc60e4..8d7ce2eda1 100644
--- a/audio/wavcapture.c
+++ b/audio/wavcapture.c
@@ -104,8 +104,8 @@ static struct capture_ops wav_capture_ops = {
.info = wav_capture_info
};
-int wav_start_capture (CaptureState *s, const char *path, int freq,
- int bits, int nchannels)
+int wav_start_capture(AudioState *state, CaptureState *s, const char *path,
+ int freq, int bits, int nchannels)
{
WAVState *wav;
uint8_t hdr[] = {
@@ -170,7 +170,7 @@ int wav_start_capture (CaptureState *s, const char *path, int freq,
goto error_free;
}
- cap = AUD_add_capture (&as, &ops, wav);
+ cap = AUD_add_capture(state, &as, &ops, wav);
if (!cap) {
error_report("Failed to add audio capture");
goto error_free;