summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-06-09 17:22:27 -0700
committerEric Laurent <elaurent@google.com>2014-06-19 10:05:57 -0700
commitab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa (patch)
tree0d406acdfea2d44cd430ef16ee2a25b7722e4b1d /include
parent29a8b2fe294a34ac7f004203426961a599e725ea (diff)
downloadframeworks_av-ab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa.zip
frameworks_av-ab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa.tar.gz
frameworks_av-ab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa.tar.bz2
AudioTrack: add support for compressed audio
Add support for compressed audio playback by use of an AudioTrack attached to a direct output thread. Bug: 9428304. Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioTrack.h9
-rw-r--r--include/media/IAudioFlinger.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 5dc77a3..3492520 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -632,6 +632,8 @@ protected:
nsecs_t processAudioBuffer();
bool isOffloaded() const;
+ bool isDirect() const;
+ bool isOffloadedOrDirect() const;
// caller must hold lock on mLock for all _l methods
@@ -648,6 +650,13 @@ protected:
bool isOffloaded_l() const
{ return (mFlags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) != 0; }
+ bool isOffloadedOrDirect_l() const
+ { return (mFlags & (AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|
+ AUDIO_OUTPUT_FLAG_DIRECT)) != 0; }
+
+ bool isDirect_l() const
+ { return (mFlags & AUDIO_OUTPUT_FLAG_DIRECT) != 0; }
+
// Next 4 fields may be changed if IAudioTrack is re-created, but always != 0
sp<IAudioTrack> mAudioTrack;
sp<IMemory> mCblkMemory;
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index c742810..fc8be20 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -50,6 +50,7 @@ public:
TRACK_TIMED = 1, // client requests a TimedAudioTrack
TRACK_FAST = 2, // client requests a fast AudioTrack or AudioRecord
TRACK_OFFLOAD = 4, // client requests offload to hw codec
+ TRACK_DIRECT = 8, // client requests a direct output
};
typedef uint32_t track_flags_t;