mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
Fixed: audioengine now remembers volume between tracks.
This commit is contained in:
parent
a1fd1978c7
commit
a07696751d
@ -125,9 +125,9 @@ double Player::Volume(){
|
||||
}
|
||||
|
||||
void Player::SetVolume(double volume){
|
||||
boost::mutex::scoped_lock lock(this->mutex);
|
||||
this->volume = volume;
|
||||
if(this->output){
|
||||
boost::mutex::scoped_lock lock(this->mutex);
|
||||
this->volume = volume;
|
||||
this->output->SetVolume(this->volume);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ void Transport::Start(utfstring url){
|
||||
if(!player || player->url!=url){
|
||||
// Or create a new player
|
||||
player = Player::Create(url);
|
||||
player->SetVolume(this->volume);
|
||||
}
|
||||
|
||||
// Add to the players
|
||||
@ -128,7 +129,9 @@ double Transport::Volume(){
|
||||
void Transport::SetVolume(double volume){
|
||||
this->volume = volume;
|
||||
if(this->currentPlayer){
|
||||
this->currentPlayer->SetVolume(volume);
|
||||
for(PlayerList::iterator player=this->players.begin();player!=this->players.end();++player){
|
||||
(*player)->SetVolume(volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user