FileDocCategorySizeDatePackage
AudioPatch.javaAPI DocAndroid 5.1 API2319Thu Mar 12 22:22:30 GMT 2015android.media

AudioPatch

public class AudioPatch extends Object
An AudioPatch describes a connection between audio sources and audio sinks. An audio source can be an output mix (playback AudioBus) or an input device (microphone). An audio sink can be an output device (speaker) or an input mix (capture AudioBus). An AudioPatch is created by AudioManager.createAudioPatch() and released by AudioManager.releaseAudioPatch() It contains the list of source and sink AudioPortConfig showing audio port configurations being connected.
hide

Fields Summary
private final AudioHandle
mHandle
private final AudioPortConfig[]
mSources
private final AudioPortConfig[]
mSinks
Constructors Summary
AudioPatch(AudioHandle patchHandle, AudioPortConfig[] sources, AudioPortConfig[] sinks)

        mHandle = patchHandle;
        mSources = sources;
        mSinks = sinks;
    
Methods Summary
public AudioPortConfig[]sinks()
Retreive the list of sinks of this audio patch.

        return mSinks;
    
public AudioPortConfig[]sources()
Retrieve the list of sources of this audio patch.

        return mSources;
    
public java.lang.StringtoString()

        StringBuilder s = new StringBuilder();
        s.append("mHandle: ");
        s.append(mHandle.toString());

        s.append(" mSources: {");
        for (AudioPortConfig source : mSources) {
            s.append(source.toString());
            s.append(", ");
        }
        s.append("} mSinks: {");
        for (AudioPortConfig sink : mSinks) {
            s.append(sink.toString());
            s.append(", ");
        }
        s.append("}");

        return s.toString();