Was int or uint32_t.
When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.
Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.
Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
i.e. the "SR" RTCP packet is sent for only one of the two tracks.
fake timestamps if that's the case, previously we'd only fake timestamps
if we didn't receive _any_ "SR" packets.
Change-Id: Id63d4940d453ba6c04c62e02ab9a0ad843936bc1
related-to-bug: 5669027
get() is almost always unnecessary, except in a LOG.
Also no need to check for != 0 before calling get().
Change-Id: Ib06e7a503f86cf102f09acc1ffb2ad085025516d
frameworks/base/media/libmedia/autodetect.cpp:22: warning: 'typedef' was ignored in this declaration
Change-Id: I8c7404b9f5aa515c0fe92a5a46f24248d6fe96bf
Remove unnecessary includes of AudioTrack.h.
Use forward declaration of class names in preference to #include when possible.
Change-Id: I12982811fa75c2c7695d8bbfa595a7aaec047dc0
Previously, if we had disconnected at the high watermark,
the read immediately following a seek would fail, and would
not be retried, resulting in an error.
Change-Id: I45a53563fe17d6b54893815abc7750a7dfb0a124
Always read and write track volumes atomically. In most places this was
already being done, but there were a couple places where the left and
right channels were read independently.
Changed constant MAX_GAIN_INT to be a uint32_t instead of a float.
It is always used as a uint32_t in comparisons and assignments.
Use MAX_GAIN_INT in more places.
Now that volume is always accessed atomically, removed the union
and alias for uint16_t volume[2], and kept only volumeLR.
Removed volatile as it's meaningless.
In AudioFlinger, clamp the track volumes read from shared memory
before applying master and stream volume.
Change-Id: If65e2b27e5bc3db5bf75540479843041b58433f0
Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.
The main changes are:
- AudioService now keeps tracks of stream volumes per device:
volume indexes are kept in a HashMap < device , index>.
active device is queried from policy manager when a volume change request
is received
initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.
Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f