Skip to content
Snippets Groups Projects
Commit 7c670313 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "FM:Setup default audio encoder parameters."

parents 5029570c 131a93dd
Branches
No related tags found
No related merge requests found
...@@ -1137,6 +1137,12 @@ public class FMRadioService extends Service ...@@ -1137,6 +1137,12 @@ public class FMRadioService extends Service
mRecorder.setAudioSource(MediaRecorder.AudioSource.RADIO_TUNER); mRecorder.setAudioSource(MediaRecorder.AudioSource.RADIO_TUNER);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
final int samplingRate = 44100;
mRecorder.setAudioSamplingRate(samplingRate);
final int bitRate = 128000;
mRecorder.setAudioEncodingBitRate(bitRate);
final int audiochannels = 2;
mRecorder.setAudioChannels(audiochannels);
} catch (RuntimeException exception) { } catch (RuntimeException exception) {
mRecorder.reset(); mRecorder.reset();
mRecorder.release(); mRecorder.release();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment