| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ |
|
| |
| |
| |
| |
| |
| | |
This saves 1063 bytes and probably improves performance.
Change-Id: I11cf0dfd925fbaec75e3d1b806852a538eae5518
|
|/
|
|
|
|
| |
The .h is not modified to avoid increasing data size.
Change-Id: Ide4a821a5b16424ffa03471dfff98dc3e9b5f751
|
|
|
|
|
|
| |
Use if (p != NULL) instead of if (ptr)
Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In constructors, initialize member fields in the initialization list
rather than constructor body where possible. This allows more fields
to be const, provided they are never modified.
Also initialize POD fields in constructor, unless it's obvious they
don't need to be initialized. In that case, put a comment instead.
Remove explicit clear() in destructors on fields that are now const.
Give AudioSessionRef a default constructor, so it's immutable fields can
be marked const.
Add comment about ~TrackBase() trick.
Initialize fields in declaration order to make it easier to confirm that
all fields are set.
Move initialization of mHardwareStatus from onFirstRef() to constructor.
Use NULL not 0 to initialize raw pointers in initialization list.
Rename field mClient to mAudioFlingerClient, and getter from client()
to audioFlingerClient().
Change-Id: Ib36cf6ed32f3cd19003f40a5d84046eb4c122052
|
|
|
|
|
|
|
|
|
| |
Don't check that pointer is non-NULL before delete.
Don't leave deleted member fields non-NULL, except in a destructor,
since it could be misleading in a dump or debugger. (mRsmpOutBuffer)
Change-Id: Ic0492a6b752f74a67f4c96dfb89ca2de4e69eecf
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ic99608d0c14ed56c02f036e0bbaaae1b16bab8ba
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I70203abd6a6f54e5bd9f1412800cc01212157e58
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using the builtin is faster on some platforms, for example on ARM it's
19 instructions instead of 13, and is O(1) instead of O(n). Of course,
track creation is an inherently slow operation, so this doesn't matter
much now. But if we add support for virtual tracks, then physical tracks
will be allocated/freed more frequently. Also just on principle ...
Change-Id: I3f590934092bd7a1869cbedbc7357928aa5cc8ff
|
| |
| |
| |
| |
| |
| |
| | |
See https://android-git.corp.google.com/g/#/c/157220
Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
|
| |
| |
| |
| |
| |
| |
| | |
See https://android-git.corp.google.com/g/157065
Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
This is a first step towards making the mixer more object-oriented.
Change-Id: Ifd445d0e471023a7f5c82e934736ffc95ba1b05b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose. So rename the private
uses to use the standard names.
In addition, AudioFlinger was relying on the macro expanding to extra ( ).
Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
|
|\ \ \
| | | |
| | | |
| | | | |
Change-Id: I0c910d391a38a916d8431f7d1f5b82e39e1a66c2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The calculation done in prepareTracks_l() for the minimum amount
off frames needed to mix one output buffer had 2 issues:
- the additional sample needed for interpolation was not included
- the fact that the resampler does not acknowledge the frames consumed
immediately after each mixing round but only once all frames requested have been used
was not taken into account.
Thus the number of frames available in track buffer could be considered sufficient although
it was not and the resampler would abort producing a short silence perceived as a click.
Issue 5727099.
Change-Id: I7419847a7474c7d9f9170bedd0a636132262142c
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
See https://android-git.corp.google.com/g/156016
Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | | |
Change-Id: Icf23f7f90fdeb660f4015f22cf239e6d05f5d03c
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: If820dfd58b6df258570750610a07af99598d9e53
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | | |
Change-Id: Ib8ce72028a7ea30e82baa518e381370e820ebbd0
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Replace series of if/then/elses by easier-to-read switch. Also return
void instead of status_t, since callers weren't checking it. Assert on
bad input parameters.
Change-Id: Ie1f0a297977b28501d20e1af819afed9b4750616
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
This is safe, as the input parameter is always track->name(),
which must be valid.
Change-Id: Iea8ea3a5706c27026335526ba8851030d00681f8
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Return void, not status_t, from setActiveTrack and setBufferProvider.
These methods returned status_t, but the callers never checked the
return value. Since these aren't externally visible APIs, they now
return void, and assert on bad input parameters.
Change-Id: I530ed29484596ae41e8659826ca425149c51c2a1
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
The MIXING enum isn't needed, and now returns void instead of status_t.
Change-Id: Ibe4ec24081d75ad4ab78b9c7191fc9077959c4e9
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
Change-Id: Iab3f9abbdab617dc5a599e657ec46a0b0a002eef
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Use git diff -w to verify.
Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
|
|/ /
| |
| |
| | |
Change-Id: I47e3849f048d4d990c9634f9c8a2ca2de0339e93
|
|/
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Record and playback objects (resp AudioRecord and AudioTrack)
are created using a channel mask, but this information is lost
in the mixer because only the channel count is known to
AudioFlinger. A channel count can always be derived from a
channel mask.
The change consists in:
- disambiguiting variable names for channel masks and counts
- passing the mask information from the client to AudioFlinger
and the mixer.
- when using the DIRECT ouput, only verifying the format of
the track is compatible with the output's for PCM.
Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that when an AudioRecord using the resampler is restarted,
the resampler state is not reset (as there is no reset function in the resampler).
The consequence is that the first time the record thread loop runs, it calls the resampler
which consumes the remaining data in the input buffer and when this buffer is released
the input index is incremented over the limit.
The fix consists in implementing a reset function in the resampler.
A similar problem was also present for playback but unoticed because the track buffer is always
drained by the mixer when a track stops. The only problem for playback was that the initial
phase fraction was wrong when restarting a track after stop (it was correct after a pause).
Change-Id: Ifc2585d685f4402d29f4afc63f6efd1d69265de3
|
|
|
|
|
|
|
|
| |
When resampling too short sound, AudioMixer uses previous
tracks buffer. So we re-initialize the temporary buffer per
loop to avoid it.
Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760
|
|
moved surfaceflinger, audioflinger, cameraservice
all native services should now reside in this location.
Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
|