diff --git a/include/AudioBufferSource.h b/include/AudioBufferSource.h index fa9a2759..80985e60 100644 --- a/include/AudioBufferSource.h +++ b/include/AudioBufferSource.h @@ -60,13 +60,15 @@ namespace openshot AudioSampleBuffer *buffer; public: - /// Default constructor + /// @brief Default constructor + /// @param audio_buffer This buffer contains the samples you want to play through JUCE. AudioBufferSource(AudioSampleBuffer *audio_buffer); /// Destructor ~AudioBufferSource(); - /// Get the next block of audio samples + /// @brief Get the next block of audio samples + /// @param info This struct informs us of which samples are needed next. void getNextAudioBlock (const AudioSourceChannelInfo& info); /// Prepare to play this audio source @@ -75,7 +77,8 @@ namespace openshot /// Release all resources void releaseResources(); - /// Set the next read position of this source + /// @brief Set the next read position of this source + /// @param newPosition The sample # to start reading from void setNextReadPosition (long long newPosition); /// Get the next read position of this source @@ -87,7 +90,8 @@ namespace openshot /// Determines if this audio source should repeat when it reaches the end bool isLooping() const; - /// Set if this audio source should repeat when it reaches the end + /// @brief Set if this audio source should repeat when it reaches the end + /// @param shouldLoop Determines if the audio source should repeat when it reaches the end void setLooping (bool shouldLoop); /// Update the internal buffer used by this source diff --git a/include/AudioResampler.h b/include/AudioResampler.h index 4c44a46b..86680872 100644 --- a/include/AudioResampler.h +++ b/include/AudioResampler.h @@ -71,10 +71,15 @@ namespace openshot { /// Destructor ~AudioResampler(); - /// Sets the audio buffer and key settings + /// @brief Sets the audio buffer and key settings + /// @param new_buffer The audio samples that need to be resampled + /// @param sample_rate The original sample rate of the buffered samples + /// @param new_sample_rate The requested sample rate you need. int SetBuffer(AudioSampleBuffer *new_buffer, double sample_rate, double new_sample_rate); - /// Sets the audio buffer and key settings + /// @brief Sets the audio buffer and key settings + /// @param new_buffer The audio samples that need to be resampled + /// @param ratio The multiplier that needs to be applied to the sample rate (this is how resampling happens) int SetBuffer(AudioSampleBuffer *new_buffer, double ratio); /// Get the resampled audio buffer