Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
- xStreamBuffer: update to new xSongPos syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn-nesby committed Aug 12, 2018
1 parent 7a01dcf commit 5e3ffec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions classes/xStreamBuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ function xStreamBuffer:update_read_buffer()
self.pattern_buffer[xinc] = xLine.do_read(
pos.sequence,pos.line,self.include_hidden,self.track_index)
--print("update_read_buffer - read from pattern - xinc,pos",xinc,pos)
local travelled = xSongPos.increase_by_lines(1,pos)
xinc = xinc + travelled
pos = xSongPos.increase_by_lines(1,pos)
xinc = xinc + 1
end
self:wipe_futures()
end
Expand Down Expand Up @@ -452,8 +452,8 @@ function xStreamBuffer:_create_content(num_lines,xinc)
self:set_buffer(xinc,xline)
end

local travelled = xSongPos.increase_by_lines(1,pos)
xinc = xinc + travelled
pos = xSongPos.increase_by_lines(1,pos)
xinc = xinc + 1

end

Expand Down Expand Up @@ -548,7 +548,7 @@ function xStreamBuffer:immediate_output()
local live_mode = rns.transport.playing
local xinc = self:_get_xinc()
local pos = xSongPos.create(self.xpos.pos)
xSongPos.increase_by_lines(1,pos)
pos = xSongPos.increase_by_lines(1,pos)

--print("*** immediate output")
self:write_output(pos,xinc,nil,live_mode)
Expand Down Expand Up @@ -602,7 +602,7 @@ function xStreamBuffer:write_output(pos,xinc,num_lines,live_mode)

if (tmp_pos.line > patt_num_lines) then
--print(">>> write_output exceeded pattern - normalize the songpos and redial ")
xSongPos.normalize(tmp_pos)
tmp_pos = xSongPos.normalize(tmp_pos)
self:write_output(tmp_pos,xinc+i,num_lines-i)
return
end
Expand Down

0 comments on commit 5e3ffec

Please sign in to comment.