Changes To QEMU audio
Not logged in

Changes to "QEMU audio" between 2015-12-18 09:57:50 and 2015-12-18 10:02:35

29
30
31
32
33
34
35
36

37
38
39
40
41
42

43
44
45
46
47
48
49
50
51
52
53
54








29
30
31
32
33
34
35

36
37
38
39
40
41

42
43
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
61







-
+





-
+











-
+
+
+
+
+
+
+
+

These options are set via environment variables, which are not documented in the QEMU user guide. You have to start

    qemu-system-i386 -audio-help

To get brief list of those variables.

Main variable is QEMU_AUDIO_DRV, which allows to specify driver, which would be used to input/output sound from QEMU.
Main variable is QEMU\_AUDIO\_DRV, which allows to specify driver, which would be used to input/output sound from QEMU.

Useful drivers are:

*. **spice** - redirects audio to your spice client. Has one playback and one capture channel. Supports no options.

*. **pa** - uses pulseaudio. Supports following variables QEMU_PA_SAMPLES (size of buffer), QEMU_PA_SERVER - address of pulseaudio server, if non-default, QEMU_PA_SINK - name of audio output sink, QEMU_PA_SOURCE  name of audio input source.
*. **pa** - uses pulseaudio. Supports following variables QEMU\_PA\_SAMPLES (size of buffer), QEMU\_PA\_SERVER - address of pulseaudio server, if non-default, QEMU\_PA\_SINK - name of audio output sink, QEMU\_PA\_SOURCE  name of audio input source.

*. **alsa** talks directly with linux kernel drivers. There is horde of options which I don't understand

Less useful drivers:

*. **sdl** - use sdl library to output audio. Doesn't support sound input.

*. **oss** - talks to oss kernel drivers. Anybody uses OSS in 2015?

*. **none** - disable sound altogether.

*. **wav** - write all sound output to the wav file specified by QEMU_WAV_PATH variable. You can set frequency format (i.e. bit per sample and signed unsigned) and number of channels. No support for sound input. You can get same functionality with any of other drivers, if you use [vws] **record** (or **wavcapture** command in the QEMU monitor)
*. **wav** - write all sound output to the wav file specified by QEMU\_WAV\_PATH variable. You can set frequency format (i.e. bit per sample and signed unsigned) and number of channels. No support for sound input. You can get same functionality with any of other drivers, if you use [vws](wiki?name=vws) **record** (or **wavcapture** command in the QEMU monitor)

Recording sound from QEMU
=========================

QEMU provides ability to record sound into file. There is **wavcapture** command in the monitor which start recording into specified file and **stopcapture** respectively. You can start several captures into different files and stop them by their ids, found via **info capture**.

You need to specify full path to the capture file, otherwise it would be written into some strange place, if you got enough rights to write there.