Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/safchain/sa_dsp
Android Jni interface to "ChunkWare Music Software" audio compressor/gate/limiter filters
https://github.com/safchain/sa_dsp
Last synced: 28 days ago
JSON representation
Android Jni interface to "ChunkWare Music Software" audio compressor/gate/limiter filters
- Host: GitHub
- URL: https://github.com/safchain/sa_dsp
- Owner: safchain
- Created: 2012-12-09T23:32:19.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-05T21:48:45.000Z (almost 12 years ago)
- Last Synced: 2024-07-30T22:35:33.712Z (3 months ago)
- Language: C
- Size: 125 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sa_dsp
======Android Jni interface to "ChunkWare Music Software" audio compressor/gate/limiter filters
Example:
```java
import sa.dsp.Compressor;
import sa.dsp.Gate;public void record {
Compressor compressor = new Compressor();
compressor.setThresh(-10.0d);
compressor.setRatio(-4.0d);
compressor.initRuntime();Gate gate = new Gate();
gate.setThresh(-36.0d);
gate.initRuntime();
int bufferSize = AudioRecord.getMinBufferSize(RECORDER_SAMPLERATE,
RECORDER_CHANNELS, RECORDER_AUDIO_ENCODING);
AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
RECORDER_SAMPLERATE, RECORDER_CHANNELS,
RECORDER_AUDIO_ENCODING, bufferSize);
recorder.startRecording();
short pcm[] = new short[bufferSize];
int read = 0;
while (true) {
read = recorder.read(pcm, 0, bufferSize);
if (read > 0 && AudioRecord.ERROR_INVALID_OPERATION != read) {
gate.process(read, pcm);
compressor.process(read, pcm);
}
}
recorder.stop();
recorder.release();
}
```