Skip to content

SnapshotAudioSource

final class SnapshotAudioSource
Implements: IAudioSource
Package: dev.joid.test.snapshot · Module: tool-testkit · Source: SnapshotAudioSource.java

An audio source that plays nothing, so that snapshot tests need no sound device.

SnapshotRunner registers an audio bridge that creates them.

ReturnsSignatureSummary
SnapshotAudioSource()Creates a simulated audio source.

ReturnsSignatureSummary
voiddelete()Does nothing.
voidplay()Does nothing.
voidstop()Does nothing.
voidpause()Does nothing.
voidgain(float gain)Does nothing.
voidgroup(Object group)Does nothing.
voidwrite(short[] samples)Drops the samples.
booleanisPlaying()Returns false.
intgetBufferedSamples()Returns 0.

SnapshotAudioSource()

Creates a simulated audio source.

void delete()

Does nothing.

void play()

Does nothing.

void stop()

Does nothing.

void pause()

Does nothing.

void gain(float gain)

Does nothing.

void group(Object group)

Does nothing.

void write(short[] samples)

Drops the samples.

boolean isPlaying()

Returns false.

int getBufferedSamples()

Returns 0.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page