Class SetVolume.Builder
- java.lang.Object
-
- nl.harm27.obs.websocket.api.base.BaseBuilder
-
- nl.harm27.obs.websocket.api.requests.sources.SetVolume.Builder
-
- Enclosing class:
- SetVolume
public static class SetVolume.Builder extends BaseBuilder
-
-
Constructor Summary
Constructors Constructor Description Builder(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetVolume.Request
batchMessage()
Batch the message to the OBS Studio instance.String
getSource()
Source name.double
getVolume()
Desired volume.Optional<Boolean>
isUseDecibel()
Interperet `volume` data as decibels instead of amplitude/mul.void
sendMessage(Consumer<SetVolume.Response> consumer)
Send the message to the OBS Studio instance.void
setSource(String source)
Source name.void
setUseDecibel(boolean useDecibel)
Interperet `volume` data as decibels instead of amplitude/mul.void
setVolume(double volume)
Desired volume.-
Methods inherited from class nl.harm27.obs.websocket.api.base.BaseBuilder
batchMessage, getNewMessageId, sendMessage
-
-
-
-
Constructor Detail
-
Builder
public Builder(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
-
Method Detail
-
getSource
public String getSource()
Source name.
-
setSource
public void setSource(String source)
Source name.
-
getVolume
public double getVolume()
Desired volume. Must be between `0.0` and `20.0` for mul, and under 26.0 for dB. OBS will interpret dB values under -100.0 as Inf. Note: The OBS volume sliders only reach a maximum of 1.0mul/0.0dB, however OBS actually supports larger values.
-
setVolume
public void setVolume(double volume)
Desired volume. Must be between `0.0` and `20.0` for mul, and under 26.0 for dB. OBS will interpret dB values under -100.0 as Inf. Note: The OBS volume sliders only reach a maximum of 1.0mul/0.0dB, however OBS actually supports larger values.
-
isUseDecibel
public Optional<Boolean> isUseDecibel()
Interperet `volume` data as decibels instead of amplitude/mul.
-
setUseDecibel
public void setUseDecibel(boolean useDecibel)
Interperet `volume` data as decibels instead of amplitude/mul.
-
sendMessage
public void sendMessage(Consumer<SetVolume.Response> consumer)
Send the message to the OBS Studio instance.
-
batchMessage
public SetVolume.Request batchMessage()
Batch the message to the OBS Studio instance.
-
-