Android에서 오디오를 읽고 이해하려고합니다. 나의 수색에서 나는 함께왔다 this article. 여기서 그는 wav 형식으로 오디오를 녹음하는 코드를 작성했습니다. 하지만 거기에 내가 완전히 이해하지 않는 한 가지이며, 그 자신의 code의 첫 번째 루프 :샘플 속도를 통해 오디오 루프를 기록 하시겠습니까?
public class ExtAudioRecorder
{
private final static int[] sampleRates = {44100, 22050, 11025, 8000};
public static ExtAudioRecorder getInstanse(Boolean recordingCompressed)
{
ExtAudioRecorder result = null;
if(recordingCompressed)
{
result = new ExtAudioRecorder( false,
AudioSource.MIC,
sampleRates[3],
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
}
else
{
int i=0;
do
{
result = new ExtAudioRecorder( true,
AudioSource.MIC,
sampleRates[i],
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
} while((++i<sampleRates.length) & !(result.getState() == ExtAudioRecorder.State.INITIALIZING));
}
return result;
그는에 대한 기본 정보를 같이 제공하지만, 나는 완전히이하지 않습니다. 다른 유형의 Android 기기의 성능과 관련이 있습니까? 어쨌든, 누군가가 나를 위해 이것을 밝게 할 수 있기를 바랍니다 :)
감사합니다. –