Lines Matching refs:wav
44 WAVVoiceOut *wav = (WAVVoiceOut *) hw; in wav_write_out() local
45 int64_t bytes = audio_rate_get_bytes(&wav->rate, &hw->info, len); in wav_write_out()
48 if (bytes && fwrite(buf, bytes, 1, wav->f) != 1) { in wav_write_out()
53 wav->total_samples += bytes / hw->info.bytes_per_frame; in wav_write_out()
70 WAVVoiceOut *wav = (WAVVoiceOut *) hw; in wav_init_out() local
79 AudiodevWavOptions *wopts = &dev->u.wav; in wav_init_out()
80 struct audsettings wav_as = audiodev_to_audsettings(dev->u.wav.out); in wav_init_out()
119 wav->f = fopen(wav_path, "wb"); in wav_init_out()
120 if (!wav->f) { in wav_init_out()
126 if (fwrite (hdr, sizeof (hdr), 1, wav->f) != 1) { in wav_init_out()
132 audio_rate_start(&wav->rate); in wav_init_out()
138 WAVVoiceOut *wav = (WAVVoiceOut *) hw; in wav_fini_out() local
141 uint32_t datalen = wav->total_samples * hw->info.bytes_per_frame; in wav_fini_out()
144 if (!wav->f) { in wav_fini_out()
151 if (fseek (wav->f, 4, SEEK_SET)) { in wav_fini_out()
156 if (fwrite (rlen, 4, 1, wav->f) != 1) { in wav_fini_out()
161 if (fseek (wav->f, 32, SEEK_CUR)) { in wav_fini_out()
166 if (fwrite (dlen, 4, 1, wav->f) != 1) { in wav_fini_out()
173 if (fclose (wav->f)) { in wav_fini_out()
175 wav->f, strerror (errno)); in wav_fini_out()
177 wav->f = NULL; in wav_fini_out()
182 WAVVoiceOut *wav = (WAVVoiceOut *) hw; in wav_enable_out() local
185 audio_rate_start(&wav->rate); in wav_enable_out()