Передовой опыт :Где ресемплировать PCM и какой инструмент?

Я разработал модуль ядра (Android ), который предоставляет мне:

PCM
16-bit
48000 Hz
2 channel

и я хочу передать его в Apple Airport Express (AEX )в java.

Для AEX требуется PCM с частотой 44,1 кГц, поэтому я должен передискретизировать поток PCM -.

У меня есть следующие возможности, но какой из них лучше?

1. Используйте программу C -"raop _play" (часть raop -play )

advantages: 
            high-performant due to native C
            already uses libsamplerate to resample wav, mp3, ogg, flac, aac, pls
            openssl as static library
            usable via command-line from my java-program via Runtime.exec()

disadvantages:
            I am relative new to C
            overloaded: I don't need wav, mp3.. only PCM
            many dependencies with GPL-libraries which I have to compile for Android
            only supports PCM already with 44.1 kHz, no resampling for PCM implemented yet 
            -> have to implement resampling for PCM

. 2. Ресемплинг и потоковая передача в java (с помощью libresample JNI -bridge)

advantages: 
            I CAN java :)
            middle-performant due to resamling in C, but streaming in java
            just one dependency to LGPL-library
            no Runtime.exec() needed

disadvantages:
            needs [bouncycastle][3] for AES which is a bit larger than openssl
            less performant than solution #1 (but maybe fast enough)

3. Передискретизировать уже в модуле ядра

advantages: 
            most performant
            no resampling at higher level

disadvantages:
            I am relative new to C
            Is it possible to use libsamplerate or libresample in kernel-space?!

9
задан Martin L. 27 June 2012 в 07:33
поделиться