mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix for [#28792] Invalid 'aud' documentation examples.
This commit is contained in:
parent
1714d1cfe2
commit
a4a09fc638
1 changed files with 3 additions and 3 deletions
|
|
@ -11,10 +11,10 @@ device = aud.device()
|
|||
factory = aud.Factory('music.ogg')
|
||||
|
||||
# play the audio, this return a handle to control play/pause
|
||||
handle = device.play(sound)
|
||||
handle = device.play(factory)
|
||||
# if the audio is not too big and will be used often you can buffer it
|
||||
factory_buffered = aud.Factory.buffer(sound)
|
||||
handle_buffered = device.play(buffered)
|
||||
factory_buffered = aud.Factory.buffer(factory)
|
||||
handle_buffered = device.play(factory_buffered)
|
||||
|
||||
# stop the sounds (otherwise they play until their ends)
|
||||
handle.stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue