Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-06-10 19:20:15 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-06-10 19:20:15 +0300
commit9676642cc94599b3419c9aaa5cf1aae2fbbd235f (patch)
tree87d10b470c60159371c2c4a4dc97ab00d99d04bc
parent09df0f0b772b836badf6e97bd91fcd88f63e5df2 (diff)
Super hacky hack (not for master for sure) to stop blender for crashing
with scene audio recursion in mattieu's gooseberry edit in sequencer. Will probably cause something else to explode but let's just guard against this in the audio lib for now.
-rw-r--r--intern/audaspace/intern/AUD_Sequencer.cpp3
-rw-r--r--intern/audaspace/intern/AUD_Sequencer.h2
-rw-r--r--intern/audaspace/intern/AUD_SequencerReader.cpp5
3 files changed, 9 insertions, 1 deletions
diff --git a/intern/audaspace/intern/AUD_Sequencer.cpp b/intern/audaspace/intern/AUD_Sequencer.cpp
index ddcf97e2ea1..a5b70232068 100644
--- a/intern/audaspace/intern/AUD_Sequencer.cpp
+++ b/intern/audaspace/intern/AUD_Sequencer.cpp
@@ -44,7 +44,8 @@ AUD_Sequencer::AUD_Sequencer(AUD_Specs specs, float fps, bool muted) :
m_distance_model(AUD_DISTANCE_MODEL_INVERSE_CLAMPED),
m_volume(1, 1.0f),
m_location(3),
- m_orientation(4)
+ m_orientation(4),
+ m_recursive(false)
{
AUD_Quaternion q;
m_orientation.write(q.get());
diff --git a/intern/audaspace/intern/AUD_Sequencer.h b/intern/audaspace/intern/AUD_Sequencer.h
index 1066eeae8e3..ef68efbbafc 100644
--- a/intern/audaspace/intern/AUD_Sequencer.h
+++ b/intern/audaspace/intern/AUD_Sequencer.h
@@ -201,6 +201,8 @@ public:
* \param entry The entry to remove.
*/
void remove(boost::shared_ptr<AUD_SequencerEntry> entry);
+
+ bool m_recursive;
};
#endif //__AUD_SEQUENCER_H__
diff --git a/intern/audaspace/intern/AUD_SequencerReader.cpp b/intern/audaspace/intern/AUD_SequencerReader.cpp
index aef93cd3896..b893b132fa3 100644
--- a/intern/audaspace/intern/AUD_SequencerReader.cpp
+++ b/intern/audaspace/intern/AUD_SequencerReader.cpp
@@ -78,6 +78,9 @@ AUD_Specs AUD_SequencerReader::getSpecs() const
void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
{
+ if (m_sequence->m_recursive)
+ return;
+
AUD_MutexLock lock(*m_sequence);
if(m_sequence->m_status != m_status)
@@ -192,7 +195,9 @@ void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
v2 -= v;
m_device.setListenerVelocity(v2 * m_sequence->m_fps);
+ m_sequence->m_recursive = true;
m_device.read(reinterpret_cast<data_t*>(buffer + specs.channels * pos), len);
+ m_sequence->m_recursive = false;
pos += len;
time += float(len) / float(specs.rate);