mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add the hasSource method to the AudioMixer interface.
PiperOrigin-RevId: 551804976
This commit is contained in:
parent
c221958889
commit
b15e7553e5
2 changed files with 6 additions and 0 deletions
|
|
@ -106,6 +106,11 @@ public interface AudioMixer {
|
||||||
*/
|
*/
|
||||||
int addSource(AudioFormat sourceFormat, long startTimeUs) throws UnhandledAudioFormatException;
|
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.
|
* Sets the volume applied to future samples queued from the given source.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ import java.nio.ByteOrder;
|
||||||
return sourceId;
|
return sourceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hasSource(int sourceId) {
|
public boolean hasSource(int sourceId) {
|
||||||
checkStateIsConfigured();
|
checkStateIsConfigured();
|
||||||
return containsKey(sources, sourceId);
|
return containsKey(sources, sourceId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue