本文整理汇总了C++中ISound::GetTimeLeft方法的典型用法代码示例。如果您正苦于以下问题:C++ ISound::GetTimeLeft方法的具体用法?C++ ISound::GetTimeLeft怎么用?C++ ISound::GetTimeLeft使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISound
的用法示例。
在下文中一共展示了ISound::GetTimeLeft方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Handle
void MusicPlayer::Handle(ProcessEventArg arg) {
if (!playlist.empty() && !stalled) {
ISound* currentSound = playlist.at(current);
// logger.info << "time left: " <<
// currentSound->GetTimeLeft().ToString() << logger.end;
if(currentSound->GetTimeLeft() <= tran->GetInTime()) {
if (switchToNextNumber == false) Next();
switchToNextNumber = true;
}
if (switchToNextNumber) {
tran->InitFade(currentSound,
playlist.at(nextTrackNumber));
tran->Start();
current = nextTrackNumber;
switchToNextNumber = false;
}
if (!tran->IsDone()) {
tran->Process();
}
/*
Vector<3, float> pos = cam->GetPosition();
//set the position of the current
if (monoreftype && (typeid(*currentsound).name() ==
typeid(*monoreftype).name())) {
IMonoSound* cursound = (IMonoSound*) currentsound;
cursound->SetPosition(pos);
}
else {
IStereoSound* cursound = (IStereoSound*) currentsound;
IMonoSound* left = cursound->GetLeft();
IMonoSound* right = cursound->GetRight();
pos[0] = pos[0] - 1;
left->SetPosition(pos);
pos[0] = pos[0] + 1;
right->SetPosition(pos);
}
//set the position of the old if initialize
if (monoreftype && (typeid(*previoussound).name() ==
typeid(*monoreftype).name())) {
IMonoSound* presound = (IMonoSound*) previoussound;
presound->SetPosition(pos);
}
else {
IStereoSound* presound = (IStereoSound*) previoussound;
IMonoSound* left = presound->GetLeft();
IMonoSound* right = presound->GetRight();
pos[0] = pos[0] - 1;
left->SetPosition(pos);
pos[0] = pos[0] + 1;
right->SetPosition(pos);
}
*/
}
}