summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2011-10-24 09:30:15 +0200
committerDanny Baumann <dannybaumann@web.de>2012-03-12 11:13:51 +0100
commite8d7e31d20624e95907b01e8234b4e4ce0506286 (patch)
treed2410a7ea749bd35c8257db39c2a2a1ef20d1eda
parent4d2c5ca8a3598b37ddb202844e5e9d2bcb5f3b1b (diff)
downloadframeworks_base-e8d7e31d20624e95907b01e8234b4e4ce0506286.zip
frameworks_base-e8d7e31d20624e95907b01e8234b4e4ce0506286.tar.gz
frameworks_base-e8d7e31d20624e95907b01e8234b4e4ce0506286.tar.bz2
Create Kineto-compatible AudioTrack::set and AudioRecord::set methods.
-rw-r--r--media/libmedia/AudioRecord.cpp34
-rw-r--r--media/libmedia/AudioTrack.cpp36
2 files changed, 70 insertions, 0 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 556e9ef..c0ee5b0 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -146,6 +146,40 @@ AudioRecord::~AudioRecord()
}
}
+#ifdef USE_KINETO_COMPATIBILITY
+// another hack, this time for a Froyo-compatible AudioRecord::set method
+extern "C" status_t _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ibi(
+ AudioRecord *This,
+ int inputSource,
+ uint32_t sampleRate,
+ int format,
+ uint32_t channels,
+ int frameCount,
+ uint32_t flags,
+ AudioRecord::callback_t,
+ void* user,
+ int notificationFrames,
+ bool threadCanCallJava,
+ int sessionId);
+extern "C" status_t _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ib(
+ AudioRecord *This,
+ int inputSource,
+ uint32_t sampleRate,
+ int format,
+ uint32_t channels,
+ int frameCount,
+ uint32_t flags,
+ AudioRecord::callback_t cbf,
+ void* user,
+ int notificationFrames,
+ bool threadCanCallJava)
+{
+ return _ZN7android11AudioRecord3setEijijijPFviPvS1_ES1_ibi(
+ This, inputSource, sampleRate, format, channels, frameCount,
+ flags, cbf, user, notificationFrames, threadCanCallJava, 0);
+}
+#endif
+
status_t AudioRecord::set(
int inputSource,
uint32_t sampleRate,
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index d404f9e..1c4a8d3 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -164,6 +164,42 @@ AudioTrack::~AudioTrack()
}
}
+#ifdef USE_KINETO_COMPATIBILITY
+// another hack, this time for a Froyo-compatible AudioTrack::set method
+extern "C" status_t _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEbi(
+ AudioTrack *This,
+ int streamType,
+ uint32_t sampleRate,
+ int format,
+ int channels,
+ int frameCount,
+ uint32_t flags,
+ AudioTrack::callback_t cbf,
+ void* user,
+ int notificationFrames,
+ const sp<IMemory>& sharedBuffer,
+ bool threadCanCallJava,
+ int sessionId);
+extern "C" status_t _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEb(
+ AudioTrack *This,
+ int streamType,
+ uint32_t sampleRate,
+ int format,
+ int channels,
+ int frameCount,
+ uint32_t flags,
+ AudioTrack::callback_t cbf,
+ void* user,
+ int notificationFrames,
+ const sp<IMemory>& sharedBuffer,
+ bool threadCanCallJava)
+{
+ return _ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEbi(
+ This, streamType, sampleRate, format, channels, frameCount, flags, cbf,
+ user, notificationFrames, sharedBuffer, threadCanCallJava, 0);
+}
+#endif
+
status_t AudioTrack::set(
int streamType,
uint32_t sampleRate,