Skip to content

Commit c0a2909

Browse files
docs: Move the SoundEffects constants from audio to audio.SoundEffect.
1 parent ce19f55 commit c0a2909

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/audio.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ But a new one can be created like this::
209209
Built in Sound Effects
210210
----------------------
211211

212+
⚠️ WARNING: These have not been created/implemented yet
213+
212214
Some pre-created Sound Effects are already available as examples. These can
213215
be played directly ``audio.play(audio.SoundEffect.SQUEAK)``,
214216
or used as a base to create new effects
@@ -237,9 +239,9 @@ Sound Effects Example
237239
duration=500,
238240
vol_start=100,
239241
vol_end=255,
240-
wave=audio.WAVE_TRIANGLE,
241-
fx=audio.FX_VIBRATO,
242-
interpolation=audio.LOG
242+
wave=audio.SoundEffect.WAVE_TRIANGLE,
243+
fx=audio.SoundEffect.FX_VIBRATO,
244+
interpolation=audio.SoundEffect.INTER_LOG
243245
))
244246

245247
# Play a Sound Effect instance, modify an attribute, and play it again
@@ -315,7 +317,7 @@ samples. When reading reaches the start or the mid-point of the buffer, it
315317
triggers a callback to fetch the next ``AudioFrame`` which is then copied into
316318
the buffer. This means that a sound source has under 4ms to compute the next
317319
``AudioFrame``, and for reliable operation needs to take less 2ms (which is
318-
32k cycles in micro:bit V1 or 128k in V2, so should be plenty).
320+
32000 cycles in micro:bit V1 or 128000 in V2, so should be plenty).
319321

320322

321323
AudioFrame Example

0 commit comments

Comments
 (0)