File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 88import soundfile as sf
99
1010filename = sys .argv [1 ]
11- playback_blocksize = 256
12- latency = 0
13- reading_blocksize = 1024
14- rb_size = 16 # Number of blocks, has to be power of two
11+ playback_blocksize = None
12+ latency = None
13+ reading_blocksize = 1024 # (reading_blocksize * rb_size) has to be power of 2
14+ rb_size = 16 # Number of blocks
1515
1616with sf .SoundFile (filename ) as f :
1717 with rtmixer .Mixer (channels = f .channels ,
3838 if written < size :
3939 break
4040 m .wait (action )
41- # TODO: check for ringbuffer errors
41+ if action .done_frames != f .frames :
42+ RuntimeError ('Something went wrong, not all frames were played' )
4243 if action .stats .output_underflows :
4344 print ('output underflows:' , action .stats .output_underflows )
You can’t perform that action at this time.
0 commit comments