Skip to content

Commit 652e18d

Browse files
gkastenAndroid (Google) Code Review
authored andcommitted
Merge "Update comments"
2 parents 32d72b2 + 76b6c0c commit 652e18d

File tree

8 files changed

+22
-10
lines changed

8 files changed

+22
-10
lines changed

media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ int VolumeSetVolumeLevel(EffectContext *pContext, int16_t level){
14931493
pContext->pBundledContext->firstVolume = LVM_FALSE;
14941494
}
14951495
return 0;
1496-
} /* end setVolumeLevel */
1496+
} /* end VolumeSetVolumeLevel */
14971497

14981498
//----------------------------------------------------------------------------
14991499
// VolumeGetVolumeLevel()

media/libmedia/AudioTrack.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ AudioTrack::AudioTrack(
104104
{
105105
mStatus = set(streamType, sampleRate, format, channelMask,
106106
frameCount, flags, cbf, user, notificationFrames,
107-
0, false, sessionId);
107+
0 /*sharedBuffer*/, false /*threadCanCallJava*/, sessionId);
108108
}
109109

110+
// DEPRECATED
110111
AudioTrack::AudioTrack(
111112
int streamType,
112113
uint32_t sampleRate,
@@ -124,7 +125,7 @@ AudioTrack::AudioTrack(
124125
{
125126
mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask,
126127
frameCount, (audio_policy_output_flags_t)flags, cbf, user, notificationFrames,
127-
0, false, sessionId);
128+
0 /*sharedBuffer*/, false /*threadCanCallJava*/, sessionId);
128129
}
129130

130131
AudioTrack::AudioTrack(
@@ -144,8 +145,8 @@ AudioTrack::AudioTrack(
144145
mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT)
145146
{
146147
mStatus = set(streamType, sampleRate, format, channelMask,
147-
0, flags, cbf, user, notificationFrames,
148-
sharedBuffer, false, sessionId);
148+
0 /*frameCount*/, flags, cbf, user, notificationFrames,
149+
sharedBuffer, false /*threadCanCallJava*/, sessionId);
149150
}
150151

151152
AudioTrack::~AudioTrack()

media/libmedia/JetPlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int JetPlayer::init()
8989

9090
// create the output AudioTrack
9191
mAudioTrack = new AudioTrack();
92-
mAudioTrack->set(AUDIO_STREAM_MUSIC, //TODO parametrize this
92+
mAudioTrack->set(AUDIO_STREAM_MUSIC, //TODO parameterize this
9393
pLibConfig->sampleRate,
9494
AUDIO_FORMAT_PCM_16_BIT,
9595
audio_channel_out_mask_from_count(pLibConfig->numChannels),

media/libmediaplayerservice/MediaPlayerService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ status_t MediaPlayerService::AudioOutput::open(
15711571
AUDIO_POLICY_OUTPUT_FLAG_NONE,
15721572
CallbackWrapper,
15731573
mCallbackData,
1574-
0,
1574+
0, // notification frames
15751575
mSessionId);
15761576
} else {
15771577
t = new AudioTrack(

services/audioflinger/AudioFlinger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4256,7 +4256,7 @@ void AudioFlinger::RecordThread::RecordTrack::stop()
42564256
RecordThread *recordThread = (RecordThread *)thread.get();
42574257
recordThread->stop(this);
42584258
TrackBase::reset();
4259-
// Force overerrun condition to avoid false overrun callback until first data is
4259+
// Force overrun condition to avoid false overrun callback until first data is
42604260
// read from buffer
42614261
android_atomic_or(CBLK_UNDERRUN_ON, &mCblk->flags);
42624262
}

services/audioflinger/AudioFlinger.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ class AudioFlinger :
899899
protected:
900900
SortedVector< wp<Track> > mActiveTracks;
901901

902+
// Allocate a track name. Returns name >= 0 if successful, -1 on failure.
902903
virtual int getTrackName_l() = 0;
903904
virtual void deleteTrackName_l(int name) = 0;
904905
virtual uint32_t activeSleepTimeUs();
@@ -1559,9 +1560,10 @@ mutable Mutex mLock; // mutex for process, commands and handl
15591560
uint32_t mNewLeftVolume; // new volume on left channel
15601561
uint32_t mNewRightVolume; // new volume on right channel
15611562
uint32_t mStrategy; // strategy for this effect chain
1562-
// mSuspendedEffects lists all effect currently suspended in the chain
1563-
// use effect type UUID timelow field as key. There is no real risk of identical
1563+
// mSuspendedEffects lists all effects currently suspended in the chain.
1564+
// Use effect type UUID timelow field as key. There is no real risk of identical
15641565
// timeLow fields among effect type UUIDs.
1566+
// Updated by updateSuspendedSessions_l() only.
15651567
KeyedVector< int, sp<SuspendedEffectDesc> > mSuspendedEffects;
15661568
};
15671569

services/audioflinger/AudioMixer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
5757
mState.outputTemp = NULL;
5858
mState.resampleTemp = NULL;
5959
// mState.reserved
60+
61+
// FIXME Most of the following initialization is probably redundant since
62+
// tracks[i] should only be referenced if (mTrackNames & (1 << i)) != 0
63+
// and mTrackNames is initially 0. However, leave it here until that's verified.
6064
track_t* t = mState.tracks;
6165
for (unsigned i=0 ; i < MAX_NUM_TRACKS ; i++) {
6266
t->needs = 0;

services/audioflinger/AudioMixer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ class AudioMixer
7070

7171

7272
// For all APIs with "name": TRACK0 <= name < TRACK0 + MAX_NUM_TRACKS
73+
74+
// Allocate a track name. Returns new track name if successful, -1 on failure.
7375
int getTrackName();
76+
77+
// Free an allocated track by name
7478
void deleteTrackName(int name);
7579

80+
// Enable or disable an allocated track by name
7681
void enable(int name);
7782
void disable(int name);
7883

0 commit comments

Comments
 (0)