Skip to content

Commit

Permalink
Merge pull request #6 from tkelman/fixscope
Browse files Browse the repository at this point in the history
Fix scope issue with orig_color
  • Loading branch information
ssfrr authored Jun 8, 2017
2 parents 65ad813 + 21e08f5 commit f106c74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RingBuffers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function write(rbuf::RingBuffer{T}, data::AbstractArray{T}, nframes) where {T}
isopen(rbuf) || return 0

cond = Condition()
nwritten = 0
try
push!(rbuf.writers, cond)
if length(rbuf.writers) > 1
Expand All @@ -77,7 +78,6 @@ function write(rbuf::RingBuffer{T}, data::AbstractArray{T}, nframes) where {T}
isopen(rbuf) || return 0
end
# now we're in the front of the queue
nwritten = 0
n = PaUtil_WriteRingBuffer(rbuf.pabuf,
pointer(data),
nframes)
Expand Down Expand Up @@ -197,6 +197,7 @@ function read!(rbuf::RingBuffer{T}, data::AbstractArray{T}, nframes) where {T}
end

cond = Condition()
nread = 0
try
push!(rbuf.readers, cond)
if length(rbuf.readers) > 1
Expand All @@ -205,7 +206,6 @@ function read!(rbuf::RingBuffer{T}, data::AbstractArray{T}, nframes) where {T}
isopen(rbuf) || return 0
end
# now we're in the front of the queue
nread = 0
n = PaUtil_ReadRingBuffer(rbuf.pabuf,
pointer(data),
nframes)
Expand Down

0 comments on commit f106c74

Please sign in to comment.