本文整理汇总了C++中Cue::getLength方法的典型用法代码示例。如果您正苦于以下问题:C++ Cue::getLength方法的具体用法?C++ Cue::getLength怎么用?C++ Cue::getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cue
的用法示例。
在下文中一共展示了Cue::getLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotFinishLoading
void BaseTrackPlayer::slotFinishLoading(TrackPointer pTrackInfoObject)
{
// Read the tags if required
if (!m_pLoadedTrack->getHeaderParsed()) {
m_pLoadedTrack->parse();
}
// m_pLoadedTrack->setPlayedAndUpdatePlaycount(true); // Actually the song is loaded but not played
// Update the BPM and duration values that are stored in ControlObjects
m_pDuration->set(m_pLoadedTrack->getDuration());
m_pBPM->slotSet(m_pLoadedTrack->getBpm());
m_pKey->slotSet(m_pLoadedTrack->getKey());
m_pReplayGain->slotSet(m_pLoadedTrack->getReplayGain());
// Update the PlayerInfo class that is used in EngineShoutcast to replace
// the metadata of a stream
PlayerInfo::instance().setTrackInfo(getGroup(), m_pLoadedTrack);
// Reset the loop points.
m_pLoopInPoint->slotSet(-1);
m_pLoopOutPoint->slotSet(-1);
const QList<Cue*> trackCues = pTrackInfoObject->getCuePoints();
QListIterator<Cue*> it(trackCues);
while (it.hasNext()) {
Cue* pCue = it.next();
if (pCue->getType() == Cue::LOOP) {
int loopStart = pCue->getPosition();
int loopEnd = loopStart + pCue->getLength();
if (loopStart != -1 && loopEnd != -1 && even(loopStart) && even(loopEnd)) {
m_pLoopInPoint->slotSet(loopStart);
m_pLoopOutPoint->slotSet(loopEnd);
break;
}
}
}
emit(newTrackLoaded(m_pLoadedTrack));
}
示例2: slotFinishLoading
void BaseTrackPlayerImpl::slotFinishLoading(TrackPointer pTrackInfoObject)
{
m_replaygainPending = false;
// Read the tags if required
if (!m_pLoadedTrack->getHeaderParsed()) {
m_pLoadedTrack->parse(false);
}
// m_pLoadedTrack->setPlayedAndUpdatePlaycount(true); // Actually the song is loaded but not played
// Update the BPM and duration values that are stored in ControlObjects
m_pDuration->set(m_pLoadedTrack->getDuration());
m_pBPM->slotSet(m_pLoadedTrack->getBpm());
m_pKey->slotSet(m_pLoadedTrack->getKey());
m_pReplayGain->slotSet(m_pLoadedTrack->getReplayGain());
// Update the PlayerInfo class that is used in EngineShoutcast to replace
// the metadata of a stream
PlayerInfo::instance().setTrackInfo(getGroup(), m_pLoadedTrack);
// Reset the loop points.
m_pLoopInPoint->slotSet(-1);
m_pLoopOutPoint->slotSet(-1);
const QList<Cue*> trackCues = pTrackInfoObject->getCuePoints();
QListIterator<Cue*> it(trackCues);
while (it.hasNext()) {
Cue* pCue = it.next();
if (pCue->getType() == Cue::LOOP) {
int loopStart = pCue->getPosition();
int loopEnd = loopStart + pCue->getLength();
if (loopStart != -1 && loopEnd != -1 && even(loopStart) && even(loopEnd)) {
m_pLoopInPoint->slotSet(loopStart);
m_pLoopOutPoint->slotSet(loopEnd);
break;
}
}
}
if(m_pConfig->getValueString(ConfigKey("[Mixer Profile]", "EqAutoReset"), 0).toInt()) {
if (m_pLowFilter != NULL) {
m_pLowFilter->set(1.0);
}
if (m_pMidFilter != NULL) {
m_pMidFilter->set(1.0);
}
if (m_pHighFilter != NULL) {
m_pHighFilter->set(1.0);
}
if (m_pLowFilterKill != NULL) {
m_pLowFilterKill->set(0.0);
}
if (m_pMidFilterKill != NULL) {
m_pMidFilterKill->set(0.0);
}
if (m_pHighFilterKill != NULL) {
m_pHighFilterKill->set(0.0);
}
m_pPreGain->set(1.0);
}
if(m_pConfig->getValueString(ConfigKey("[Controls]", "SpeedAutoReset"), 0).toInt()) {
if (m_pSpeed != NULL) {
m_pSpeed->set(0.0);
}
// Note: speed may effect pitch
if (m_pPitch != NULL) {
m_pPitch->set(0.0);
}
}
emit(newTrackLoaded(m_pLoadedTrack));
}