diff options
author | Glenn Kasten <gkasten@google.com> | 2015-01-26 16:35:47 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2015-03-13 16:22:16 -0700 |
commit | f59497bd3c190e087202043de5450ef06e92b27d (patch) | |
tree | 52ff88a5a4bd358358850e0ca16d0f9527fded4e | |
parent | 802a568f77b9a372537e4216b2a7cbb203958a87 (diff) | |
download | frameworks_av-f59497bd3c190e087202043de5450ef06e92b27d.zip frameworks_av-f59497bd3c190e087202043de5450ef06e92b27d.tar.gz frameworks_av-f59497bd3c190e087202043de5450ef06e92b27d.tar.bz2 |
Update comments
Change-Id: I37d3c4ce22b74fe8581a886fe5a7f9fef8266dad
-rw-r--r-- | include/media/AudioRecord.h | 4 | ||||
-rw-r--r-- | include/media/AudioSystem.h | 4 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 2 | ||||
-rw-r--r-- | include/private/media/AudioTrackShared.h | 4 | ||||
-rw-r--r-- | media/libmedia/AudioTrackShared.cpp | 1 | ||||
-rw-r--r-- | services/audioflinger/FastMixer.cpp | 1 | ||||
-rw-r--r-- | services/audioflinger/Threads.h | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index f70d981..59bfc4e 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -88,8 +88,8 @@ public: * user: Pointer to context for use by the callback receiver. * info: Pointer to optional parameter according to event type: * - EVENT_MORE_DATA: pointer to AudioRecord::Buffer struct. The callback must not read - * more bytes than indicated by 'size' field and update 'size' if fewer bytes are - * consumed. + * more bytes than indicated by 'size' field and update 'size' if + * fewer bytes are consumed. * - EVENT_OVERRUN: unused. * - EVENT_MARKER: pointer to const uint32_t containing the marker position in frames. * - EVENT_NEW_POS: pointer to const uint32_t containing the new position in frames. diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 2ab3dd6..5d57c41 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -110,7 +110,7 @@ public: // audio_stream->get_buffer_size()/audio_stream_out_frame_size() static status_t getFrameCount(audio_io_handle_t output, size_t* frameCount); - // returns the audio output stream latency in ms. Corresponds to + // returns the audio output latency in ms. Corresponds to // audio_stream_out->get_latency() static status_t getLatency(audio_io_handle_t output, uint32_t* latency); @@ -122,7 +122,7 @@ public: static status_t setVoiceVolume(float volume); // return the number of audio frames written by AudioFlinger to audio HAL and - // audio dsp to DAC since the specified output I/O handle has exited standby. + // audio dsp to DAC since the specified output has exited standby. // returned status (from utils/Errors.h) can be: // - NO_ERROR: successful operation, halFrames and dspFrames point to valid data // - INVALID_OPERATION: Not supported on current hardware platform diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 31a14f0..397366b 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -94,6 +94,8 @@ public: sp<IMemory>& buffers, // return value 0 means it follows cblk status_t *status) = 0; + // FIXME Surprisingly, sampleRate/format/frameCount/latency don't work for input handles + /* query the audio hardware state. This state never changes, * and therefore can be cached. */ diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h index 7143f1a..5644428 100644 --- a/include/private/media/AudioTrackShared.h +++ b/include/private/media/AudioTrackShared.h @@ -53,8 +53,8 @@ namespace android { struct AudioTrackSharedStreaming { // similar to NBAIO MonoPipe // in continuously incrementing frame units, take modulo buffer size, which must be a power of 2 - volatile int32_t mFront; // read by server - volatile int32_t mRear; // write by client + volatile int32_t mFront; // read by consumer (output: server, input: client) + volatile int32_t mRear; // written by producer (output: client, input: server) volatile int32_t mFlush; // incremented by client to indicate a request to flush; // server notices and discards all data between mFront and mRear volatile uint32_t mUnderrunFrames; // server increments for each unavailable but desired frame diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp index 08241e2..6d5f1af 100644 --- a/media/libmedia/AudioTrackShared.cpp +++ b/media/libmedia/AudioTrackShared.cpp @@ -423,7 +423,6 @@ status_t AudioTrackClientProxy::waitStreamEndDone(const struct timespec *request goto end; } // check for obtainBuffer interrupted by client - // check for obtainBuffer interrupted by client if (flags & CBLK_INTERRUPT) { ALOGV("waitStreamEndDone() interrupted by client"); status = -EINTR; diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp index e070f90..f1cf0aa 100644 --- a/services/audioflinger/FastMixer.cpp +++ b/services/audioflinger/FastMixer.cpp @@ -415,6 +415,7 @@ void FastMixer::onWork() memset(mMixerBuffer, 0, mMixerBufferSize); mMixerBufferState = ZEROED; } + // prepare the buffer used to write to sink void *buffer = mSinkBuffer != NULL ? mSinkBuffer : mMixerBuffer; if (mFormat.mFormat != mMixerBufferFormat) { // sink format not the same as mixer format memcpy_by_audio_format(buffer, mFormat.mFormat, mMixerBuffer, mMixerBufferFormat, diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 9350e48..d600ea9 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -427,7 +427,7 @@ protected: bool mStandby; // Whether thread is currently in standby. audio_devices_t mOutDevice; // output device audio_devices_t mInDevice; // input device - audio_source_t mAudioSource; // (see audio.h, audio_source_t) + audio_source_t mAudioSource; const audio_io_handle_t mId; Vector< sp<EffectChain> > mEffectChains; |