[Android] [PATCH] jni/aout: limit sample rate to 48kHz

Zhang Rui bbcallen at gmail.com
Sat Oct 19 13:39:27 CEST 2013


> Here is a 2kHz: http://people.videolan.org/~funman/bouteille.wav
Thanks. And here is a 96khz: http://bili-test.u.qiniudn.com/aac-96khz.flv

Here is my test result with VLC android 0.1.3

Nexus 10 (4.3):
amem: does not work
audiotrack: Could not initialize libmedia.so!
sles: does not work

Nexus S (4.1.2):
amem: does not work
audiotrack: does not work
sles: does not work

Log of Nexus 10
==  using amem ==
10-19 19:07:10.525: D/VLC(25650): main generic: creating audio output
10-19 19:07:10.525: D/VLC(25650): main audio output: looking for audio
output module matching "amem,none": 4 candidates
10-19 19:07:10.525: D/VLC(25650): main audio output: using audio
output module "amem"
10-19 19:07:10.530: E/VLC(25650): main audio output: too low audio
sample frequency (2000)
10-19 19:07:10.530: D/VLC(25650): main generic: keeping audio output
10-19 19:07:10.530: E/VLC(25650): main decoder: failed to create audio output

==  using audiotrack, sles ==
10-19 19:10:28.015: D/VLC(25650): main audio output: looking for audio
output module matching "android_audiotrack": 4 candidates
10-19 19:10:28.015: E/VLC(25650): android_audiotrack audio output:
Could not initialize libmedia.so!
10-19 19:10:28.015: D/VLC(25650): main audio output: using audio
output module "opensles_android"
10-19 19:10:28.015: E/VLC(25650): main audio output: too low audio
sample frequency (2000)
10-19 19:10:28.015: D/VLC(25650): main generic: keeping audio output
10-19 19:10:28.015: E/VLC(25650): main decoder: failed to create audio output

==================
==================
http://bili-test.u.qiniudn.com/aac-96khz.flv
96khz test

Nexus 10 (4.3):
amem: does not work
audiotrack: Could not initialize libmedia.so!
sles: works after resample to 44.1khz

Nexus S (4.1.2):
amem: does not work
audiotrack: works after resample to 48khz
sles: works after resample to 44.1khz

Log of Nexus 10
==  using amem ==
10-19 19:15:38.795: I/VLC/JNI/aout(25650): Opening the JNI audio output
10-19 19:15:38.795: I/VLC/JNI/aout(25650): Parameters: 2 channels,
FOURCC 'S16N',  sample rate: 96000Hz
10-19 19:15:38.795: D/VLC/LibVLC(25650): Opening the java audio output
10-19 19:15:38.795: D/LibVLC/aout(25650): 96000, 2, 8192=>16384
10-19 19:15:38.795: E/VLC/JNI/aout(25650): Unable to create audio player!

==  using audiotrack + sles == (only sles works)
10-19 19:13:48.600: D/VLC(25650): main audio output: looking for audio
output module matching "android_audiotrack": 4 candidates
10-19 19:13:48.600: E/VLC(25650): android_audiotrack audio output:
Could not initialize libmedia.so!
10-19 19:13:48.600: D/VLC(25650): main audio output: using audio
output module "opensles_android"
10-19 19:13:48.605: D/VLC(25650): main audio output: output 's16l'
44100 Hz Stereo frame=1 samples/4 bytes
10-19 19:13:48.605: D/VLC(25650): main volume: looking for audio
volume module matching "any": 3 candidates
10-19 19:13:48.605: D/VLC(25650): main volume: using audio volume
module "integer_mixer"
10-19 19:13:48.605: D/VLC(25650): main audio output: input 'f32l'
96000 Hz Stereo frame=1 samples/8 bytes
10-19 19:13:48.610: D/VLC(25650): main audio output: conversion:
'f32l'->'s16l' 96000 Hz->96000 Hz Stereo->Stereo
10-19 19:13:48.610: D/VLC(25650): main audio converter: looking for
audio converter module matching "any": 7 candidates
10-19 19:13:48.610: D/VLC(25650): audio_format audio converter:
f32l->s16l, bits per sample: 32->16
10-19 19:13:48.610: D/VLC(25650): main audio converter: using audio
converter module "audio_format"
10-19 19:13:48.610: D/VLC(25650): main audio output: conversion
pipeline complete
10-19 19:13:48.610: D/VLC(25650): main audio resampler: looking for
audio resampler module matching "any": 1 candidates
10-19 19:13:48.610: D/VLC(25650): main audio resampler: using audio
resampler module "ugly_resampler"


More information about the Android mailing list