Skip to content

Commit

Permalink
remove focus request timeout, think it's doing more harm then good
Browse files Browse the repository at this point in the history
  • Loading branch information
silverchris committed Aug 22, 2022
1 parent c2964e1 commit f8508f9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Platforms/Mazda/Managers/AudioManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ void AudioManager::onAudioFocusChange(json result, Stream *stream) {
updateFocus(stream->channelId, AudioFocusState::LOSS);
if(promise_ != nullptr){
promise_.reset();
timer_.cancel();
}
LOG(DEBUG) << "Stream " << stream->id << ": " << stream->name << " Focus Lost";
} else if (focus == "temporarilyLost") {
Expand All @@ -57,7 +56,6 @@ void AudioManager::onAudioFocusChange(json result, Stream *stream) {
if(promise_ != nullptr){
promise_->resolve();
promise_.reset();
timer_.cancel();
}
else{
if(stream->channelId == aasdk::messenger::ChannelId::MEDIA_AUDIO) {
Expand Down Expand Up @@ -184,8 +182,6 @@ void AudioManager::requestFocus(aasdk::messenger::ChannelId channelId,
LOG(DEBUG) << args;
try {
promise_ = std::move(promise);
timer_.expires_from_now(std::chrono::seconds(1));
timer_.async_wait(strand_.wrap([this](const asio::error_code &error) { onTimerExceeded(error); }));
std::string result = AudioProxy->Request("requestAudioFocus", args.dump());
LOG(DEBUG) << "requestAudioFocus(" << args.dump().c_str() << ")\n" << result.c_str();
}
Expand Down

0 comments on commit f8508f9

Please sign in to comment.