Skip to content

Instantly share code, notes, and snippets.

@Sciss
Last active September 5, 2015 21:54
Show Gist options
  • Select an option

  • Save Sciss/0ecec4f0e3be39319d17 to your computer and use it in GitHub Desktop.

Select an option

Save Sciss/0ecec4f0e3be39319d17 to your computer and use it in GitHub Desktop.
val buf = Buffer.alloc(s, 32768, 2)
buf.write((userHome / "Music" / "MyHeart_199_iter1_no475s.aif").path, numFrames = 0, leaveOpen = true)
val rec = play(addAction = addToTail) {
DiskOut.ar(buf.id, In.ar(0, 2))
()
}
// ...
rec.free()
buf.close(); buf.free()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment