diff options
author | Eric Laurent <elaurent@google.com> | 2009-11-04 08:27:26 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2009-11-04 23:47:21 -0800 |
commit | 34f1d8ecd23169a5f299937e3aaf1bd7937578a0 (patch) | |
tree | 04f5504f74df6dde00b495a95bf30766be12821a /include/media/AudioRecord.h | |
parent | c6c6237a67661c7b2d8822b7360cdf01e64d2c7c (diff) | |
download | frameworks_av-34f1d8ecd23169a5f299937e3aaf1bd7937578a0.zip frameworks_av-34f1d8ecd23169a5f299937e3aaf1bd7937578a0.tar.gz frameworks_av-34f1d8ecd23169a5f299937e3aaf1bd7937578a0.tar.bz2 |
Fix issue 2203561: Sholes: audio playing out of earpiece.
Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error.
Do the same if start fails due to the same error after time out in obtainBuffer().
Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails.
This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash.
Same modifications for AudioRecord.
Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
Diffstat (limited to 'include/media/AudioRecord.h')
-rw-r--r-- | include/media/AudioRecord.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 503cb31..008468c 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -314,6 +314,11 @@ private: }; bool processAudioBuffer(const sp<ClientRecordThread>& thread); + status_t openRecord(uint32_t sampleRate, + int format, + int channelCount, + int frameCount, + uint32_t flags); sp<IAudioRecord> mAudioRecord; sp<IMemory> mCblkMemory; @@ -341,6 +346,7 @@ private: uint32_t mNewPosition; uint32_t mUpdatePeriod; audio_io_handle_t mInput; + uint32_t mFlags; }; }; // namespace android |