use of org.vinuxproject.sonic.Sonic in project Prestissimo by TheRealFalcon.
the class Track method initDevice.
private void initDevice(int sampleRate, int numChannels) {
mLock.lock();
final int format = findFormatFromChannels(numChannels);
final int minSize = AudioTrack.getMinBufferSize(sampleRate, format, AudioFormat.ENCODING_PCM_16BIT);
mTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, format, AudioFormat.ENCODING_PCM_16BIT, minSize * 4, AudioTrack.MODE_STREAM);
mSonic = new Sonic(sampleRate, numChannels);
mLock.unlock();
}
Aggregations