///////////////////////////////////////////////////////
| 169 | |
| 170 | //////////////////////////////////////////////////////////// |
| 171 | bool SoundBuffer::saveToFile(const std::filesystem::path& filename) const |
| 172 | { |
| 173 | // Create the sound file in write mode |
| 174 | OutputSoundFile file; |
| 175 | if (file.openFromFile(filename, getSampleRate(), getChannelCount(), getChannelMap())) |
| 176 | { |
| 177 | // Write the samples to the opened file |
| 178 | file.write(m_samples.data(), m_samples.size()); |
| 179 | |
| 180 | return true; |
| 181 | } |
| 182 | |
| 183 | return false; |
| 184 | } |
| 185 | |
| 186 | |
| 187 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected