diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-03-19 23:20:26 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-03-19 23:21:17 +0300 |
commit | 817c38f715ceef93ee8a156c7646064e2bcc6712 (patch) | |
tree | 46490b70a7db9b0e6162300f9ca8ecada0786935 /doc | |
parent | 4b74b35322f247ce75251e941cfed6610a0477e8 (diff) |
PyAPI Docs: Update aud example
Fixes T74641
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/aud.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/python_api/examples/aud.py b/doc/python_api/examples/aud.py index bbe97168efe..a52258c1a45 100644 --- a/doc/python_api/examples/aud.py +++ b/doc/python_api/examples/aud.py @@ -2,20 +2,20 @@ Basic Sound Playback ++++++++++++++++++++ -This script shows how to use the classes: :class:`Device`, :class:`Factory` and +This script shows how to use the classes: :class:`Device`, :class:`Sound` and :class:`Handle`. """ import aud -device = aud.device() +device = aud.Device() # load sound file (it can be a video file with audio) -factory = aud.Factory('music.ogg') +sound = aud.Sound('music.ogg') # play the audio, this return a handle to control play/pause -handle = device.play(factory) +handle = device.play(sound) # if the audio is not too big and will be used often you can buffer it -factory_buffered = aud.Factory.buffer(factory) -handle_buffered = device.play(factory_buffered) +sound_buffered = aud.Sound.buffer(sound) +handle_buffered = device.play(sound_buffered) # stop the sounds (otherwise they play until their ends) handle.stop() |