public static final class TeeAudioProcessor.WavFileAudioBufferSink extends java.lang.Object implements TeeAudioProcessor.AudioBufferSink
Note: if writing to external storage it's necessary to grant the WRITE_EXTERNAL_STORAGE permission.
| Constructor and Description |
|---|
WavFileAudioBufferSink(java.lang.String outputFileNamePrefix)
Creates a new audio buffer sink that writes to .wav files with the given prefix.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush(int sampleRateHz,
int channelCount,
int encoding)
Called when the audio processor is flushed with a format of subsequent input.
|
void |
handleBuffer(java.nio.ByteBuffer buffer)
Called when data is written to the audio processor.
|
public WavFileAudioBufferSink(java.lang.String outputFileNamePrefix)
outputFileNamePrefix - The prefix for output files.public void flush(int sampleRateHz,
int channelCount,
int encoding)
TeeAudioProcessor.AudioBufferSinkflush in interface TeeAudioProcessor.AudioBufferSinkpublic void handleBuffer(java.nio.ByteBuffer buffer)
TeeAudioProcessor.AudioBufferSinkhandleBuffer in interface TeeAudioProcessor.AudioBufferSinkbuffer - A read-only buffer containing input which the audio processor will handle.