コード例 #1
0
ファイル: player.cpp プロジェクト: VlaoMao/vkplayer-dbus
Player::Player()
{
    curIndex = -1;
    prevIndex = -1;
    listSync = false;
    setState(Player::STOPED);
    autoNext = false;
    obCreated = false;
    sMusic = false;
    queueSize = -1;

    shuffle = false;
    repeat = false;

    bufferOff = false;

    mediaObject = new Phonon::MediaObject(this);
    audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
    Phonon::createPath(mediaObject, audioOutput);
    connect(mediaObject, SIGNAL(finished()), this, SLOT(playFinished()));
    connect(mediaObject, SIGNAL(tick(qint64)), this, SIGNAL(tick(qint64)));
    connect(mediaObject, SIGNAL(totalTimeChanged(qint64)), this, SIGNAL(totalTimeChanged(qint64)));

    ba = new QByteArray();
    buffer = new QBuffer();
}
コード例 #2
0
ファイル: kaudio.cpp プロジェクト: kthxbyte/KDE1-Linaro
void KAudio::checkFinished()
{
  if ( StatChunk->sync_id == currentId ) {
    // There is no point in emitting a signal now.
    // Either we played no sound after setSignals(true) or we signalled already
    return;
  }
  if ( StatChunk->sync_id == KeysChunk->sync_id ) {
    emit playFinished();
    // Copy the sync_id, so we see, that we have signalled the id already
    currentId = KeysChunk->sync_id;
  }
}
コード例 #3
0
ファイル: audio.cpp プロジェクト: KDE/klook
void Audio::onFinished()
{
    emit playFinished();
    setPosition(0);
}