diff options
Diffstat (limited to 'mumd/src/audio.rs')
| -rw-r--r-- | mumd/src/audio.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 324b615..cd6141a 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -433,6 +433,16 @@ trait StreamingSignal { fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Frame>; } +impl<S> StreamingSignal for S + where + S: Signal + Unpin { + type Frame = S::Frame; + + fn poll_next(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Frame> { + Poll::Ready(self.get_mut().next()) + } +} + trait StreamingSignalExt: StreamingSignal { fn next(&mut self) -> Next<'_, Self> { Next { |
