MCPcopy Create free account
hub / github.com/dmlc/decord / test_sync

Function test_sync

tests/python/unittests/test_av_reader.py:42–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 av.get_batch([-1,0,1,2,3])
41
42def test_sync():
43 av = get_normal_av_reader()
44 import simpleaudio
45 audio = av[25:40][0]
46 buffer = np.array([], dtype='float32')
47 for samples in audio:
48 buffer = np.append(buffer, samples.asnumpy())
49 play = simpleaudio.play_buffer(buffer, 1, 4, 44100)
50 play.wait_done()
51
52if __name__ == '__main__':
53 import nose

Callers

nothing calls this directly

Calls 2

get_normal_av_readerFunction · 0.85
asnumpyMethod · 0.80

Tested by

no test coverage detected