Lines Matching refs:wav

35     WAVState *wav = opaque;  in wav_destroy()  local
38 uint32_t datalen = wav->bytes; in wav_destroy()
41 if (wav->f) { in wav_destroy()
45 if (fseek (wav->f, 4, SEEK_SET)) { in wav_destroy()
50 if (fwrite (rlen, 4, 1, wav->f) != 1) { in wav_destroy()
55 if (fseek (wav->f, 32, SEEK_CUR)) { in wav_destroy()
60 if (fwrite (dlen, 1, 4, wav->f) != 4) { in wav_destroy()
66 if (fclose (wav->f)) { in wav_destroy()
71 g_free (wav->path); in wav_destroy()
76 WAVState *wav = opaque; in wav_capture() local
78 if (fwrite (buf, size, 1, wav->f) != 1) { in wav_capture()
81 wav->bytes += size; in wav_capture()
86 WAVState *wav = opaque; in wav_capture_destroy() local
88 AUD_del_capture (wav->cap, wav); in wav_capture_destroy()
89 g_free (wav); in wav_capture_destroy()
94 WAVState *wav = opaque; in wav_capture_info() local
95 char *path = wav->path; in wav_capture_info()
98 wav->freq, wav->bits, wav->nchannels, in wav_capture_info()
99 path ? path : "<not available>", wav->bytes); in wav_capture_info()
110 WAVState *wav; in wav_start_capture() local
145 wav = g_malloc0 (sizeof (*wav)); in wav_start_capture()
155 wav->f = fopen (path, "wb"); in wav_start_capture()
156 if (!wav->f) { in wav_start_capture()
159 g_free (wav); in wav_start_capture()
163 wav->path = g_strdup (path); in wav_start_capture()
164 wav->bits = bits; in wav_start_capture()
165 wav->nchannels = nchannels; in wav_start_capture()
166 wav->freq = freq; in wav_start_capture()
168 if (fwrite (hdr, sizeof (hdr), 1, wav->f) != 1) { in wav_start_capture()
173 cap = AUD_add_capture(state, &as, &ops, wav); in wav_start_capture()
179 wav->cap = cap; in wav_start_capture()
180 s->opaque = wav; in wav_start_capture()
185 g_free (wav->path); in wav_start_capture()
186 if (fclose (wav->f)) { in wav_start_capture()
189 g_free (wav); in wav_start_capture()