VSE: Add sound strip retiming support #105072
|
@ -167,8 +167,8 @@ AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, doub
|
|||
|
||||
AUD_API void AUD_SequenceEntry_setAnimationData_constant_range(AUD_SequenceEntry* entry, AUD_AnimateablePropertyType type, int frame_start, int frame_end, float* data)
|
||||
{
|
||||
AnimateableProperty* prop = (*entry)->getAnimProperty(static_cast<AnimateablePropertyType>(type));
|
||||
prop->write_range(data, frame_start, frame_end);
|
||||
AnimateableProperty* prop = (*entry)->getAnimProperty(static_cast<AnimateablePropertyType>(type));
|
||||
iss marked this conversation as resolved
Outdated
|
||||
prop->write_range(data, frame_start, frame_end);
|
||||
}
|
||||
|
||||
AUD_API void AUD_SequenceEntry_setAnimationData(AUD_SequenceEntry* entry, AUD_AnimateablePropertyType type, int frame, float* data, char animated)
|
||||
|
|
|
@ -112,13 +112,13 @@ public:
|
|||
*/
|
||||
void write(const float* data, int position, int count);
|
||||
|
||||
/**
|
||||
* Fills the properties frame range with constant value and marks it animated.
|
||||
* \param data The new value.
|
||||
* \param position_start The start position in the animation in frames.
|
||||
* \param position_end The end position in the animation in frames.
|
||||
*/
|
||||
void write_range(const float* data, int position_start, int position_end);
|
||||
/**
|
||||
* Fills the properties frame range with constant value and marks it animated.
|
||||
* \param data The new value.
|
||||
* \param position_start The start position in the animation in frames.
|
||||
* \param position_end The end position in the animation in frames.
|
||||
*/
|
||||
void write_range(const float* data, int position_start, int position_end);
|
||||
iss marked this conversation as resolved
Outdated
Joerg Mueller
commented
Please rename Please rename `write_range` similarly to the other API functions that call it, so that its also clear from the name that it writes the same data into the range and doesn't get the full data for the range in the parameters. I.e. it repeats the data found in the parameter rather than expecting a bigger block of data that may differ all the way from start to end.
Joerg Mueller
commented
`writeConstantRange`
|
||||
|
||||
/**
|
||||
* Reads the properties value.
|
||||
|
|
|
@ -63,8 +63,8 @@ private:
|
|||
/// How many seconds are skipped at the beginning.
|
||||
double m_skip;
|
||||
|
||||
/// The FPS of the scene.
|
||||
float m_fps;
|
||||
/// The FPS of the scene.
|
||||
float m_fps;
|
||||
iss marked this conversation as resolved
Outdated
Joerg Mueller
commented
Likely a bug: Rather than having the fps duplicated here, please add a Likely a bug: Rather than having the fps duplicated here, please add a `std::shared_ptr<SequenceData>` and get the fps from there. This way, it will be updated when `Sequence::setFPS` is called which happens when the FPS in blender are changed!
|
||||
|
||||
/// Whether the entry is muted.
|
||||
bool m_muted;
|
||||
|
|
|
@ -67,17 +67,16 @@ void AnimateableProperty::write(const float* data)
|
|||
|
||||
void AnimateableProperty::write_range(const float* data, int position_start, int position_end)
|
||||
{
|
||||
assureSize(position_end * m_count * sizeof(float), true);
|
||||
float* buf = getBuffer();
|
||||
assureSize(position_end * m_count * sizeof(float), true);
|
||||
float* buf = getBuffer();
|
||||
|
||||
for(int i = position_start; i < position_end; i++)
|
||||
{
|
||||
std::memcpy(buf + i * m_count, data, m_count * sizeof(float));
|
||||
}
|
||||
m_isAnimated = true;
|
||||
for(int i = position_start; i < position_end; i++)
|
||||
{
|
||||
std::memcpy(buf + i * m_count, data, m_count * sizeof(float));
|
||||
}
|
||||
m_isAnimated = true;
|
||||
}
|
||||
|
||||
|
||||
void AnimateableProperty::write(const float* data, int position, int count)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
||||
|
|
Loading…
Reference in New Issue
Audaspace has its own coding style as you surely noticed, since you're following most of it. Please make sure that indentation happens with tabs everywhere. I just recently introduced a clang-format file in upstream that you can find here: https://github.com/audaspace/audaspace/blob/master/.clang-format. Please only apply it to the changes though, since not all of audaspace is following it perfectly and I wouldn't want to make this patch verbose because of it (see the clang-format-diff script or https://offlinemark.com/2021/04/02/surgical-formatting-with-git-clang-format/ for example).
While we're at it: I would appreciate if you also create a pull request for the audaspace changes upstream (https://github.com/audaspace/audaspace/pulls)!