summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.h
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2011-05-24 15:53:33 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2011-06-01 10:55:29 -0700
commit0d255b2d9061ba31f13ada3fc0f7e51916407176 (patch)
tree4df26e48710542386bddab7a0d1cbfa5d6835ac0 /services/audioflinger/AudioMixer.h
parent65580f9adf6c4d98449ad0716488f9fe3869aa5a (diff)
downloadframeworks_av-0d255b2d9061ba31f13ada3fc0f7e51916407176.zip
frameworks_av-0d255b2d9061ba31f13ada3fc0f7e51916407176.tar.gz
frameworks_av-0d255b2d9061ba31f13ada3fc0f7e51916407176.tar.bz2
Use channel mask instead of channel count for track creation
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
Diffstat (limited to 'services/audioflinger/AudioMixer.h')
-rw-r--r--services/audioflinger/AudioMixer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h
index 88408a7..75c9170 100644
--- a/services/audioflinger/AudioMixer.h
+++ b/services/audioflinger/AudioMixer.h
@@ -61,7 +61,7 @@ public:
// set Parameter names
// for target TRACK
- CHANNEL_COUNT = 0x4000,
+ CHANNEL_MASK = 0x4000,
FORMAT = 0x4001,
MAIN_BUFFER = 0x4002,
AUX_BUFFER = 0x4003,
@@ -150,6 +150,7 @@ private:
uint8_t enabled : 1;
uint8_t reserved0 : 3;
uint8_t format;
+ uint32_t channelMask;
AudioBufferProvider* bufferProvider;
mutable AudioBufferProvider::Buffer buffer;