Lines Matching refs:wav
33 WAVState *wav = opaque; in wav_destroy() local
36 uint32_t datalen = wav->bytes; in wav_destroy()
39 if (wav->f) { in wav_destroy()
43 qemu_fseek (wav->f, 4, SEEK_SET); in wav_destroy()
44 qemu_put_buffer (wav->f, rlen, 4); in wav_destroy()
46 qemu_fseek (wav->f, 32, SEEK_CUR); in wav_destroy()
47 qemu_put_buffer (wav->f, dlen, 4); in wav_destroy()
48 qemu_fclose (wav->f); in wav_destroy()
51 qemu_free (wav->path); in wav_destroy()
56 WAVState *wav = opaque; in wav_capture() local
58 qemu_put_buffer (wav->f, buf, size); in wav_capture()
59 wav->bytes += size; in wav_capture()
64 WAVState *wav = opaque; in wav_capture_destroy() local
66 AUD_del_capture (wav->cap, wav); in wav_capture_destroy()
71 WAVState *wav = opaque; in wav_capture_info() local
72 char *path = wav->path; in wav_capture_info()
75 wav->freq, wav->bits, wav->nchannels, in wav_capture_info()
76 path ? path : "<not available>", wav->bytes); in wav_capture_info()
88 WAVState *wav; in wav_start_capture() local
123 wav = qemu_mallocz (sizeof (*wav)); in wav_start_capture()
133 wav->f = qemu_fopen (path, "wb"); in wav_start_capture()
134 if (!wav->f) { in wav_start_capture()
137 qemu_free (wav); in wav_start_capture()
141 wav->path = qemu_strdup (path); in wav_start_capture()
142 wav->bits = bits; in wav_start_capture()
143 wav->nchannels = nchannels; in wav_start_capture()
144 wav->freq = freq; in wav_start_capture()
146 qemu_put_buffer (wav->f, hdr, sizeof (hdr)); in wav_start_capture()
148 cap = AUD_add_capture (&as, &ops, wav); in wav_start_capture()
151 qemu_free (wav->path); in wav_start_capture()
152 qemu_fclose (wav->f); in wav_start_capture()
153 qemu_free (wav); in wav_start_capture()
157 wav->cap = cap; in wav_start_capture()
158 s->opaque = wav; in wav_start_capture()