Esempio n. 1
0
void SoundManager::onDurationChanged(SoundPlayer* player, int64_t duration)
{
    SoundClip* clip = player->clip();

    double fps = static_cast<double>(editor()->fps());

    double frameLength = duration * fps / 1000.0;
    clip->setLength(static_cast<int>(frameLength));
    clip->setDuration(duration);

    emit soundClipDurationChanged();
}