Encode as WAV bytes (16-bit PCM).
(&self)
| 150 | impl AudioOutput { |
| 151 | /// Encode as WAV bytes (16-bit PCM). |
| 152 | pub fn to_wav_bytes(&self) -> Vec<u8> { |
| 153 | crate::utils::wav::encode_wav_bytes(&self.samples, self.sample_rate) |
| 154 | } |
| 155 | |
| 156 | /// Return raw PCM f32 bytes (little-endian). |
| 157 | pub fn to_pcm_bytes(&self) -> Vec<u8> { |