Package live.hms.video.media.capturers
Class HMSWavCapturer
-
- All Implemented Interfaces:
-
live.hms.video.media.capturers.HMSCapturer
public final class HMSWavCapturer implements HMSCapturer
-
-
Field Summary
Fields Modifier and Type Field Description private final AtomicBooleanisStartedprivate final Contextcontext
-
Constructor Summary
Constructors Constructor Description HMSWavCapturer(Context context, Integer sampleRate, Integer numChannels, Integer bitsPerSample)
-
Method Summary
Modifier and Type Method Description final AtomicBooleanisStarted()final ContextgetContext()final UnitloadUrl(Integer rawRes)final BooleanreadNext10ms(ByteBuffer destBuffer)Reads exactly 10 ms of audio data from the WAV file into destBuffer. final Unitclose()Close the underlying file stream when done. Unitstart()Unitstop()-
-
Method Detail
-
isStarted
final AtomicBoolean isStarted()
-
getContext
final Context getContext()
-
readNext10ms
final Boolean readNext10ms(ByteBuffer destBuffer)
Reads exactly 10 ms of audio data from the WAV file into destBuffer.
- Returns:
true if 10 ms of data was read successfully, false if end of file (or partial read).
-
-
-
-