Package ej.audio.sink
Interface MockAudioSink
- All Known Implementing Classes:
MockDefaultAudioSink
public interface MockAudioSink
Implementation of an Audio Sink in the mock.
Before writing to an Audio Sink, it must be started calling start(). This resource must also be released by
calling close() once there is no more audio data to play.
The default audio sink implementation is MockDefaultAudioSink, but is can be changed by setting the system
property "microej.internal.mock.audio.sink.impl".
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intintvoidsetVolume(float gain) voidstart()booleanwaitForBufferFlushed(int timeout) intwriteBuffer(byte[] array, int offset, int size, int timeout)
-
Field Details
-
MAX_FRAME_SIZE
static final int MAX_FRAME_SIZE- See Also:
-
-
Method Details
-
getResourceId
int getResourceId() -
getBufferSize
int getBufferSize() -
setVolume
void setVolume(float gain) -
start
void start() throws ej.sni.NativeIOException- Throws:
ej.sni.NativeIOException
-
close
void close() -
writeBuffer
int writeBuffer(byte[] array, int offset, int size, int timeout) throws ej.sni.NativeIOException - Throws:
ej.sni.NativeIOException
-
waitForBufferFlushed
boolean waitForBufferFlushed(int timeout)
-