コード例 #1
0
ファイル: TrackComponent.cpp プロジェクト: dmtaudio/mordaw
void TrackComponent::resized()
{
        // update the bounds of the regions to the values in the _posX container
        for(size_t current = 0; current < _regions.size(); ++current)
        {
            auto r(getLocalBounds().reduced(4));
            r.setX((int)_posX.at(current));
            int64 lengthSeconds = samplesToSeconds(_sizeSamps.at(current), _sampleRate);
            r.setWidth((int)lengthSeconds * (int)_pixelsPerClip);
            r.removeFromBottom(6);
            _regionComponents.at(current)->setBounds(r.removeFromBottom(90));
        }
    // set the track mixer bounds
    _trackMixer->setBounds(0, 0, (int)_mixerOffset, getParentHeight());
    repaint();
}
コード例 #2
0
ファイル: tsound.cpp プロジェクト: Makoto-Sasahara/opentoonz
double TSoundTrack::getDuration() const {
  return samplesToSeconds(m_sampleCount);
}