mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
This commit bumps the `ios` branch from 5.0.0 alpha to 5.1.2 release. I merged v5.0-release first then v5.1-release. So it was a sequential merge. I'm just waiting to the approval of continuing development. The stuff that are missing (those are so close to implement): - #145484 iOS: Keyboard Input Support: https://projects.blender.org/blender/blender/pulls/145484 - #145702 iOS: Add clipboard Image: https://projects.blender.org/blender/blender/pulls/145702 - Fix QOS threading - Expose Downloads - UIScene Migration `make deps` needs to run two times. (still hacky....) OSL occurs racing conditions. Disclaimer: I used AI for searching in Documentation of Deps. So the implementation is by hand. **SACRED PINKY FINGER PROMISE** Pull Request: https://projects.blender.org/blender/blender/pulls/161073
22 lines
611 B
Python
22 lines
611 B
Python
"""
|
|
Basic Sound Playback
|
|
++++++++++++++++++++
|
|
|
|
This script shows how to use the classes: :class:`Device`, :class:`Sound` and
|
|
:class:`Handle`.
|
|
"""
|
|
import aud
|
|
|
|
device = aud.Device()
|
|
# Load sound file (it can be a video file with audio).
|
|
sound = aud.Sound('music.ogg')
|
|
|
|
# Play the audio, this return a handle to control play/pause.
|
|
handle = device.play(sound)
|
|
# If the audio is not too big and will be used often you can buffer it.
|
|
sound_buffered = aud.Sound.cache(sound)
|
|
handle_buffered = device.play(sound_buffered)
|
|
|
|
# Stop the sounds (otherwise they play until their ends).
|
|
handle.stop()
|
|
handle_buffered.stop()
|