{"action":"closed","pull_request":{"created_at":"2011-12-11T22:59:36Z","state":"closed","review_comments":0,"changed_files":2,"updated_at":"2011-12-12T20:00:12Z","_links":{"review_comments":{"href":"https://api.github.com/repos/overtone/overtone/pulls/44/comments"},"comments":{"href":"https://api.github.com/repos/overtone/overtone/issues/44/comments"},"html":{"href":"https://github.com/overtone/overtone/pull/44"},"self":{"href":"https://api.github.com/repos/overtone/overtone/pulls/44"}},"patch_url":"https://github.com/overtone/overtone/pull/44.patch","comments":3,"issue_url":"https://github.com/overtone/overtone/issues/44","user":{"gravatar_id":"80572b202e613e4c9fc9f0e1cd53f6aa","id":21178,"url":"https://api.github.com/users/neatonk","avatar_url":"https://secure.gravatar.com/avatar/80572b202e613e4c9fc9f0e1cd53f6aa?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"neatonk"},"merged":false,"body":"I've implemented basic streaming audio playback in order to cut down on memory usage when playing large files. \r\n\r\n```clj\r\n(def big-audio-file (buffer-cue \"path/to/big-audio-file.wav\"))\r\n(stereo-stream-player big-audio-file)\r\n(stop)\r\n```\r\n\r\nPlaying the stream again picks up right where you left off... sort of.\r\n\r\n```clj\r\n(stereo-stream-player big-audio-file)\r\n(stop)\r\n```\r\nUsing #'stop can leave the buffer in bad shape causing a momentary glitch when playback is resumed. This can be avoided by using #'buffer-cue-pos to refresh the buffer at the desired position in the file.\r\n\r\n```clj\r\n(buffer-cue-pos big-audio-file 0)\r\n(stereo-stream-player big-audio-file) \r\n```\r\n\r\n#'buffer-cue-pos can be called at anytime to jump to a new position in the file even while it is playing.\r\n\r\n```clj\r\n;; ...still playing...\r\n(def first-chorus (* 30 44100))\r\n(buffer-cue-pos big-audio-file first-chorus)\r\n(stop)\r\n```\r\n\r\nI'm building #'sample-stream on top of this to make a ::buffer-cue act just like a ::sample. But this will be for a later pull.\r\n\r\n```clj\r\n;; coming soon ...\r\n(def big-audio-file (sample-stream \"path/to/big-audio-file.wav\"))\r\n(big-audio-file)\r\n```","deletions":4,"mergeable":true,"commits":4,"number":44,"id":581921,"base":{"user":{"gravatar_id":"eb88032a8bc2eb591c72160cd9876d92","id":373359,"url":"https://api.github.com/users/overtone","avatar_url":"https://secure.gravatar.com/avatar/eb88032a8bc2eb591c72160cd9876d92?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"overtone"},"repo":{"created_at":"2010-08-23T12:19:57Z","pushed_at":"2011-12-12T14:38:53Z","updated_at":"2011-12-12T15:02:54Z","private":false,"clone_url":"https://github.com/overtone/overtone.git","name":"overtone","svn_url":"https://svn.github.com/overtone/overtone","watchers":325,"master_branch":"master","language":"Clojure","forks":27,"owner":{"gravatar_id":"eb88032a8bc2eb591c72160cd9876d92","id":373359,"url":"https://api.github.com/users/overtone","avatar_url":"https://secure.gravatar.com/avatar/eb88032a8bc2eb591c72160cd9876d92?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"overtone"},"id":856493,"homepage":"http://project-overtone.org","git_url":"git://github.com/overtone/overtone.git","description":"programmable music ","html_url":"https://github.com/overtone/overtone","url":"https://api.github.com/repos/overtone/overtone","size":695,"fork":true,"open_issues":3,"ssh_url":"git@github.com:overtone/overtone.git"},"sha":"a5affbfce42bc3948f4855277845cc52192cd7ef","ref":"master","label":"overtone:master"},"additions":75,"merged_by":null,"title":"Stream audio from disk with #'buffer-cue.","head":{"user":{"gravatar_id":"80572b202e613e4c9fc9f0e1cd53f6aa","id":21178,"url":"https://api.github.com/users/neatonk","avatar_url":"https://secure.gravatar.com/avatar/80572b202e613e4c9fc9f0e1cd53f6aa?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"neatonk"},"repo":{"created_at":"2011-09-26T19:41:48Z","pushed_at":"2011-12-11T22:13:39Z","updated_at":"2011-12-11T22:13:39Z","private":false,"clone_url":"https://github.com/neatonk/overtone.git","name":"overtone","svn_url":"https://svn.github.com/neatonk/overtone","watchers":2,"master_branch":"master","language":"Clojure","forks":0,"owner":{"gravatar_id":"80572b202e613e4c9fc9f0e1cd53f6aa","id":21178,"url":"https://api.github.com/users/neatonk","avatar_url":"https://secure.gravatar.com/avatar/80572b202e613e4c9fc9f0e1cd53f6aa?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"neatonk"},"id":2462847,"homepage":"http://project-overtone.org","git_url":"git://github.com/neatonk/overtone.git","description":"programmable music ","html_url":"https://github.com/neatonk/overtone","url":"https://api.github.com/repos/neatonk/overtone","size":132,"fork":true,"open_issues":0,"ssh_url":"git@github.com:neatonk/overtone.git"},"sha":"008403c3e2f5b44b2afd29b455b1da1f7ed56d9e","ref":"buffer","label":"neatonk:buffer"},"html_url":"https://github.com/overtone/overtone/pull/44","closed_at":"2011-12-12T20:00:12Z","diff_url":"https://github.com/overtone/overtone/pull/44.diff","url":"https://api.github.com/repos/overtone/overtone/pulls/44","merged_at":null},"number":44}