WebRTCDemo: Fixes warning for devices with pre-17 API level. Also fixes broken build build.xml and project.properties.
BUG=2083 R=fischman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2375004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4951 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4c61792600
commit
f53622d42e
@ -37,6 +37,7 @@ class AudioManagerAndroid {
|
||||
context.getSystemService(Context.AUDIO_SERVICE);
|
||||
|
||||
mNativeOutputSampleRate = DEFAULT_SAMPLING_RATE;
|
||||
mAudioLowLatencyOutputFrameSize = DEFAULT_FRAMES_PER_BUFFER;
|
||||
if (android.os.Build.VERSION.SDK_INT >=
|
||||
android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
String sampleRateString = audioManager.getProperty(
|
||||
@ -44,15 +45,14 @@ class AudioManagerAndroid {
|
||||
if (sampleRateString != null) {
|
||||
mNativeOutputSampleRate = Integer.parseInt(sampleRateString);
|
||||
}
|
||||
String framesPerBuffer = audioManager.getProperty(
|
||||
AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
|
||||
if (framesPerBuffer != null) {
|
||||
mAudioLowLatencyOutputFrameSize = Integer.parseInt(framesPerBuffer);
|
||||
}
|
||||
}
|
||||
mAudioLowLatencySupported = context.getPackageManager().hasSystemFeature(
|
||||
PackageManager.FEATURE_AUDIO_LOW_LATENCY);
|
||||
mAudioLowLatencyOutputFrameSize = DEFAULT_FRAMES_PER_BUFFER;
|
||||
String framesPerBuffer = audioManager.getProperty(
|
||||
AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
|
||||
if (framesPerBuffer != null) {
|
||||
mAudioLowLatencyOutputFrameSize = Integer.parseInt(framesPerBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -12,3 +12,5 @@
|
||||
|
||||
# Project target.
|
||||
target=android-17
|
||||
|
||||
java.compilerargs=-Xlint:all -Werror
|
@ -1,2 +1,2 @@
|
||||
leozwang@webrtc.org
|
||||
fischman@webrtc.org
|
||||
henrike@webrtc.org
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,8 @@
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
||||
target=android-17
|
Loading…
Reference in New Issue
Block a user