am 2cb138db: Merge "After failing to create an AudioTrack, only stop the source if we were the ones starting it." into kraken

This commit is contained in:
Andreas Huber
2010-05-27 08:59:07 -07:00
committed by Android Git Automerger

View File

@ -87,7 +87,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
DEFAULT_AUDIOSINK_BUFFERCOUNT,
&AudioPlayer::AudioSinkCallback, this);
if (err != OK) {
mSource->stop();
if (!sourceAlreadyStarted) {
mSource->stop();
}
return err;
}
@ -108,7 +110,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
delete mAudioTrack;
mAudioTrack = NULL;
mSource->stop();
if (!sourceAlreadyStarted) {
mSource->stop();
}
return err;
}