position property
Get the position of generator.
If generator is not a BufferGenerator
, StateError will be thrown.
Implementation
@override
double get position {
checkDeadSound();
final g = generator;
if (g is BufferGenerator) {
return g.playbackPosition.value;
}
throw StateError('Cannot get the playback position for $g.');
}
Set the position of generator.
If generator is not a BufferGenerator
, StateError will be thrown.
Implementation
@override
set position(final double value) {
checkDeadSound();
final g = generator;
if (g is BufferGenerator) {
g.playbackPosition.value = value;
} else {
throw StateError('Cannot set the playback position of $g.');
}
}