fix pcm examples to comply with current code base (#1720)

This commit is contained in:
Arnim Läuger 2017-01-11 21:11:38 +01:00 committed by Marcel Stör
parent 0a503587ee
commit 46dc9eaeb3
2 changed files with 3 additions and 3 deletions

View File

@ -27,8 +27,8 @@ file.open("jump_8k.u8", "r")
drv = pcm.new(pcm.SD, 1)
-- fetch data in chunks of LUA_BUFFERSIZE (1024) from file
drv:on("data", file.read)
-- fetch data in chunks of FILE_READ_CHUNK (1024) from file
drv:on("data", function(drv) return file.read() end)
-- get called back when all samples were read from the file
drv:on("drained", cb_drained)

View File

@ -119,7 +119,7 @@ function M.play(rate, ip, port, path, cb)
_path = path
_play_cb = cb
_conn = net.createConnection(net.TCP, false)
_conn = net.createConnection(net.TCP, 0)
_conn:on("receive", data_received)
_conn:on("disconnection", cb_disconnected)
_conn:connect(port, ip, cb_connected)