| 121 | |
| 122 | |
| 123 | float RecorderNode::recordedLengthInSeconds() const |
| 124 | { |
| 125 | size_t recordedChannelCount = m_data.size(); |
| 126 | if (!recordedChannelCount) |
| 127 | return 0; |
| 128 | |
| 129 | size_t numSamples = m_data[0].size(); |
| 130 | return numSamples / m_sampleRate; |
| 131 | } |
| 132 | |
| 133 | |
| 134 | bool RecorderNode::writeRecordingToWav(const std::string & filenameWithWavExtension, bool mixToMono) |