summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-01-18 10:51:55 -0800
committerAndreas Huber <andih@google.com>2012-01-18 10:51:55 -0800
commit28ea013f25626ca2a24600b5916ebe0dfc9e46cf (patch)
treece5e1ee95b62c5aeaeb3b35d8b936c67c0a60f97 /media
parent540c35f7aa01f7eba849148ea8b22eff351ce16d (diff)
downloadframeworks_base-28ea013f25626ca2a24600b5916ebe0dfc9e46cf.zip
frameworks_base-28ea013f25626ca2a24600b5916ebe0dfc9e46cf.tar.gz
frameworks_base-28ea013f25626ca2a24600b5916ebe0dfc9e46cf.tar.bz2
Temporarily restore AudioSystem/AudioTrack APIs with their former signatures
until we get updated prebuilts from vendor. Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioSystem.cpp10
-rw-r--r--media/libmedia/AudioTrack.cpp19
2 files changed, 29 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 28892df..f532d35 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -203,6 +203,11 @@ int AudioSystem::logToLinear(float volume)
return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0;
}
+// DEPRECATED
+status_t AudioSystem::getOutputSamplingRate(int* samplingRate, int streamType) {
+ return getOutputSamplingRate(samplingRate, (audio_stream_type_t)streamType);
+}
+
status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type_t streamType)
{
OutputDescriptor *outputDesc;
@@ -236,6 +241,11 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type
return NO_ERROR;
}
+// DEPRECATED
+status_t AudioSystem::getOutputFrameCount(int* frameCount, int streamType) {
+ return getOutputFrameCount(frameCount, (audio_stream_type_t)streamType);
+}
+
status_t AudioSystem::getOutputFrameCount(int* frameCount, audio_stream_type_t streamType)
{
OutputDescriptor *outputDesc;
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 7e338de..837fcc3 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -102,6 +102,25 @@ AudioTrack::AudioTrack(
}
AudioTrack::AudioTrack(
+ int streamType,
+ uint32_t sampleRate,
+ int format,
+ int channelMask,
+ int frameCount,
+ uint32_t flags,
+ callback_t cbf,
+ void* user,
+ int notificationFrames,
+ int sessionId)
+ : mStatus(NO_INIT),
+ mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT)
+{
+ mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask,
+ frameCount, flags, cbf, user, notificationFrames,
+ 0, false, sessionId);
+}
+
+AudioTrack::AudioTrack(
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,