mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add the hasSource
method to the AudioMixer interface.
PiperOrigin-RevId: 551804976
This commit is contained in:
parent
c221958889
commit
b15e7553e5
@ -106,6 +106,11 @@ public interface AudioMixer {
|
||||
*/
|
||||
int addSource(AudioFormat sourceFormat, long startTimeUs) throws UnhandledAudioFormatException;
|
||||
|
||||
/**
|
||||
* Returns whether there is an {@link #addSource added source} with the given {@code sourceId}.
|
||||
*/
|
||||
boolean hasSource(int sourceId);
|
||||
|
||||
/**
|
||||
* Sets the volume applied to future samples queued from the given source.
|
||||
*
|
||||
|
@ -151,6 +151,7 @@ import java.nio.ByteOrder;
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSource(int sourceId) {
|
||||
checkStateIsConfigured();
|
||||
return containsKey(sources, sourceId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user