faiface / beep

A little package that brings sound to any Go application. Suitable for playback and audio-processing.
MIT License
2.07k stars 152 forks source link

Create a buffer populated with output of a generator #162

Closed cuotos closed 1 year ago

cuotos commented 1 year ago

I just want to create some simple buffers that contain a fixed times worth of sine wave.

I was trying to use the Sine generator but this will stream infinite.

Is there a way to just get N number of samples from the Sine generator into a buffer?

cuotos commented 1 year ago

Found it.

beep.Take