diff options
author | Eric Wong <e@80x24.org> | 2022-01-11 18:20:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-01-11 18:22:16 +0000 |
commit | 0103a33f7ef628709389c85fee74b6c5fcd57c74 (patch) | |
tree | 43c1fad676fc3f0612d2d804143100529361f734 /test/test_buffer.rb | |
parent | cac63517e7f751cc63909c548d51d97fdd764027 (diff) | |
download | dtas-0103a33f7ef628709389c85fee74b6c5fcd57c74.tar.gz |
splice(2) alone does not give enough information as to whether the source or destination is blocking. However, as far as audio playback chain goes, the sink should ALWAYS be the limiting factor as decoder sources need to be able to produce data at least as fast as the audio is being played (otherwise there'll be audible drops). Thus, we bias the select(2) into waiting on a targets on if we splice(2) less than the data we requested.
Diffstat (limited to 'test/test_buffer.rb')
-rw-r--r-- | test/test_buffer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_buffer.rb b/test/test_buffer.rb index 54ee584..b89a090 100644 --- a/test/test_buffer.rb +++ b/test/test_buffer.rb @@ -62,7 +62,7 @@ class TestBuffer < Testcase buf = new_buffer r, w = IO.pipe buf.wr.write "HIHI" - assert_equal :wait_readable, buf.broadcast([w]) + assert_equal [w], buf.broadcast([w]) assert_equal 4, buf.bytes_xfer tmp = [w] r.close |