summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-09-01 05:56:26 -0700
committerEric Laurent <elaurent@google.com>2009-09-01 05:56:26 -0700
commitd069f32039c74d89fd158d1a25d8fdf445fd01c1 (patch)
tree9abce14d7bfedb31d59ee8ba94c6f16d82fc0aec /libs/audioflinger
parentc98d68cd56338ec57695b3c35114fbde88d4bde8 (diff)
downloadframeworks_base-d069f32039c74d89fd158d1a25d8fdf445fd01c1.zip
frameworks_base-d069f32039c74d89fd158d1a25d8fdf445fd01c1.tar.gz
frameworks_base-d069f32039c74d89fd158d1a25d8fdf445fd01c1.tar.bz2
Fix issue 2091594: music chirp after disconnecting A2DP.
In AudioFlinger::MixerThread::putTracks(), change the mFillingUpStatus flag to FS_FILLING for active tracks so that mute request is executed without ramping volume down when the track is moved from A2DP to hardware output. Also modified AudioFlinger::setStreamOutput() so that the notification of the change is sent only once to AudioSystem.
Diffstat (limited to 'libs/audioflinger')
-rw-r--r--libs/audioflinger/AudioFlinger.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index 3a419b5..ef71641 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -1449,6 +1449,8 @@ void AudioFlinger::MixerThread::putTracks(
int j = activeTracks.indexOf(t);
if (j >= 0) {
mActiveTracks.add(t);
+ // force buffer refilling and no ramp volume when the track is mixed for the first time
+ t->mFillingUpStatus = Track::FS_FILLING;
}
}
}
@@ -3512,10 +3514,11 @@ status_t AudioFlinger::setStreamOutput(uint32_t stream, int output)
if (tracks.size()) {
dstThread->putTracks(tracks, activeTracks);
}
- dstThread->sendConfigEvent(AudioSystem::STREAM_CONFIG_CHANGED, stream);
}
}
+ dstThread->sendConfigEvent(AudioSystem::STREAM_CONFIG_CHANGED, stream);
+
return NO_ERROR;
}