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 Details

  • 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)