Lines Matching defs:wav

29 #define AUDIO_CAP "wav"
55 "qemu.wav"
60 WAVVoiceOut *wav = (WAVVoiceOut *) hw;
65 int64_t ticks = now - wav->old_ticks;
76 wav->old_ticks = now;
85 dst = advance (wav->pcm_buf, rpos << hw->info.shift);
88 qemu_put_buffer (wav->f, dst, convert_samples << hw->info.shift);
92 wav->total_samples += convert_samples;
116 WAVVoiceOut *wav = (WAVVoiceOut *) hw;
152 wav->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
153 if (!wav->pcm_buf) {
164 wav->f = qemu_fopen (conf_out.wav_path, "wb");
165 if (!wav->f) {
168 qemu_free (wav->pcm_buf);
169 wav->pcm_buf = NULL;
173 qemu_put_buffer (wav->f, hdr, sizeof (hdr));
179 WAVVoiceOut *wav = (WAVVoiceOut *) hw;
182 uint32_t datalen = wav->total_samples << hw->info.shift;
185 if (!wav->f) {
192 qemu_fseek (wav->f, 4, SEEK_SET);
193 qemu_put_buffer (wav->f, rlen, 4);
195 qemu_fseek (wav->f, 32, SEEK_CUR);
196 qemu_put_buffer (wav->f, dlen, 4);
198 qemu_fclose (wav->f);
199 wav->f = NULL;
201 qemu_free (wav->pcm_buf);
202 wav->pcm_buf = NULL;
221 "qemu.wav"
249 WAVVoiceIn* wav = (WAVVoiceIn *) hw;
255 wav->f = qemu_fopen (path, "rb");
256 if (wav->f == NULL) {
262 if (qemu_get_buffer (wav->f, hdr, sizeof(hdr)) != (int)sizeof(hdr)) {
263 dolog("File '%s' to be a .wav file\n", path);
272 dolog("File '%s' is not a valid .wav file\n", path);
281 wav->total_size = le_read( hdr+40, 4 );
317 wav->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
318 if (!wav->pcm_buf) {
324 qemu_fclose (wav->f);
325 wav->f = NULL;
332 WAVVoiceIn *wav = (WAVVoiceIn *) hw;
334 if (!wav->f) {
338 qemu_fclose (wav->f);
339 wav->f = NULL;
341 qemu_free (wav->pcm_buf);
342 wav->pcm_buf = NULL;
347 WAVVoiceIn* wav = (WAVVoiceIn *) hw;
353 int64_t ticks = now - wav->old_ticks;
368 wav->old_ticks = now;
378 src = advance (wav->pcm_buf, wpos << hw->info.shift);
380 qemu_get_buffer (wav->f, src, convert_samples << hw->info.shift);
385 wav->total_samples += convert_samples;
430 "Path to output .wav file", NULL, 0},
434 "Path to input .wav file", NULL, 0},
462 INIT_FIELD (name = ) "wav",