MCPcopy Create free account
hub / github.com/LabSound/LabSound / recordedLengthInSeconds

Method recordedLengthInSeconds

src/extended/RecorderNode.cpp:123–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121
122
123float 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
134bool RecorderNode::writeRecordingToWav(const std::string & filenameWithWavExtension, bool mixToMono)

Callers 1

playMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected