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);
|
context.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
|
||||||
mNativeOutputSampleRate = DEFAULT_SAMPLING_RATE;
|
mNativeOutputSampleRate = DEFAULT_SAMPLING_RATE;
|
||||||
|
mAudioLowLatencyOutputFrameSize = DEFAULT_FRAMES_PER_BUFFER;
|
||||||
if (android.os.Build.VERSION.SDK_INT >=
|
if (android.os.Build.VERSION.SDK_INT >=
|
||||||
android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||||
String sampleRateString = audioManager.getProperty(
|
String sampleRateString = audioManager.getProperty(
|
||||||
@ -44,16 +45,15 @@ class AudioManagerAndroid {
|
|||||||
if (sampleRateString != null) {
|
if (sampleRateString != null) {
|
||||||
mNativeOutputSampleRate = Integer.parseInt(sampleRateString);
|
mNativeOutputSampleRate = Integer.parseInt(sampleRateString);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
mAudioLowLatencySupported = context.getPackageManager().hasSystemFeature(
|
|
||||||
PackageManager.FEATURE_AUDIO_LOW_LATENCY);
|
|
||||||
mAudioLowLatencyOutputFrameSize = DEFAULT_FRAMES_PER_BUFFER;
|
|
||||||
String framesPerBuffer = audioManager.getProperty(
|
String framesPerBuffer = audioManager.getProperty(
|
||||||
AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
|
AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
|
||||||
if (framesPerBuffer != null) {
|
if (framesPerBuffer != null) {
|
||||||
mAudioLowLatencyOutputFrameSize = Integer.parseInt(framesPerBuffer);
|
mAudioLowLatencyOutputFrameSize = Integer.parseInt(framesPerBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mAudioLowLatencySupported = context.getPackageManager().hasSystemFeature(
|
||||||
|
PackageManager.FEATURE_AUDIO_LOW_LATENCY);
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private int getNativeOutputSampleRate() {
|
private int getNativeOutputSampleRate() {
|
||||||
|
@ -12,3 +12,5 @@
|
|||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-17
|
target=android-17
|
||||||
|
|
||||||
|
java.compilerargs=-Xlint:all -Werror
|
@ -1,2 +1,2 @@
|
|||||||
leozwang@webrtc.org
|
|
||||||
fischman@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
|
# "ant.properties", and override values to adapt the script to your
|
||||||
# project structure.
|
# project structure.
|
||||||
|
|
||||||
# Indicates whether an apk should be generated for each density.
|
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||||
split.density=false
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-10
|
target=android-17
|
Loading…
Reference in New Issue
Block a user