From 274c97a5e2e407a4948e09d2fbfe383f59b0c415 Mon Sep 17 00:00:00 2001 From: kevinstadler Date: Fri, 22 Mar 2024 18:03:00 +0100 Subject: [PATCH] Add AudioSample web reference fixes --- src/processing/sound/AudioSample.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/processing/sound/AudioSample.java b/src/processing/sound/AudioSample.java index 78fffd2..e0e6ca3 100644 --- a/src/processing/sound/AudioSample.java +++ b/src/processing/sound/AudioSample.java @@ -15,11 +15,12 @@ * manipulate and play back sound samples. * * If you want to pre-load your audio sample with an audio file from disk you - * can do so using the {@link SoundFile} subclass. + * can do so using the SoundFile subclass. * * @webref Sampling:AudioSample * @webBrief This class allows you low-level access to an audio buffer to create, access, * manipulate and play back sound samples. + * @see SoundFile */ public class AudioSample extends SoundObject { @@ -51,15 +52,9 @@ public AudioSample(PApplet parent, int frames, boolean stereo) { * typically use "this" * @param frames * the desired number of frames for this audiosample - * @param data - * an array of float values to be used as this audiosample's sound - * data. The audiosample will consequently have as many frames as the - * length of the given array. To match the default amplitude of - * other sound generators, the sample values should be in the range - * [-0.5, 0.5] * @param stereo * whether to treat the audiosample as 2-channel (stereo) or not - * (default: false) + * (default: false) * @param frameRate * the underlying frame rate of the sample (default: 44100) * @webref Sampling:AudioSample @@ -80,6 +75,14 @@ public AudioSample(PApplet parent, int frames, int frameRate) { // duration)? // risk of accidental overloading through int/float, but could be interesting.. + /** + * @param data + * an array of float values to be used as this audiosample's sound + * data. The audiosample will consequently have as many frames as the + * length of the given array. To match the default amplitude of + * other sound generators, the sample values should be in the range + * [-0.5, 0.5] + */ public AudioSample(PApplet parent, float[] data) { this(parent, data, false); }