public final class

TeeAudioProcessor.WavFileAudioBufferSink

extends java.lang.Object

implements TeeAudioProcessor.AudioBufferSink

 java.lang.Object

↳androidx.media3.exoplayer.audio.TeeAudioProcessor.WavFileAudioBufferSink

Overview

A sink for audio buffers that writes output audio as .wav files with a given path prefix. When new audio data is handled after flushing the audio processor, a counter is incremented and its value is appended to the output file name.

Note: if writing to external storage it's necessary to grant the WRITE_EXTERNAL_STORAGE permission.

Summary

Constructors
publicWavFileAudioBufferSink(java.lang.String outputFileNamePrefix)

Creates a new audio buffer sink that writes to .wav files with the given prefix.

Methods
public voidflush(int sampleRateHz, int channelCount, int encoding)

public voidhandleBuffer(java.nio.ByteBuffer buffer)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public WavFileAudioBufferSink(java.lang.String outputFileNamePrefix)

Creates a new audio buffer sink that writes to .wav files with the given prefix.

Parameters:

outputFileNamePrefix: The prefix for output files.

Methods

public void flush(int sampleRateHz, int channelCount, int encoding)

public void handleBuffer(java.nio.ByteBuffer buffer)