1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| #include "PlayerThread.h"
using namespace std;
void PlayerThread::run(){
connect(this,SIGNAL(previousBuffer()),&player,SLOT(previousBuffer()));
connect(this,SIGNAL(play()),&player,SLOT(play()));
connect(this,SIGNAL(pause()),&player,SLOT(pause()));
connect(this,SIGNAL(stop()),&player,SLOT(stop()));
connect(this,SIGNAL(nextBuffer()),&player,SLOT(nextBuffer()));
exec();
}
void PlayerThread::loadBuffer(const string & path){
player.loadBuffer(path);
}
void PlayerThread::changeVolume(ALfloat value){
player.changeVolume(value);
}
void PlayerThread::changeBalance(int value){
player.changeBalance(value);
}
void PlayerThread::setCurrentBuffer(int index){
player.setCurrentBuffer(index);
}
bool PlayerThread::isPlaying(){
return player.isPlaying();
} |
Partager