///////////////////////////////////////////////////////
| 259 | |
| 260 | //////////////////////////////////////////////////////////// |
| 261 | Time InputSoundFile::getTimeOffset() const |
| 262 | { |
| 263 | // Make sure we don't divide by 0 |
| 264 | if (m_channelMap.empty() || m_sampleRate == 0) |
| 265 | return Time::Zero; |
| 266 | |
| 267 | return seconds( |
| 268 | static_cast<float>(m_sampleOffset) / static_cast<float>(m_channelMap.size()) / static_cast<float>(m_sampleRate)); |
| 269 | } |
| 270 | |
| 271 | |
| 272 | //////////////////////////////////////////////////////////// |
no outgoing calls
no test coverage detected