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:
Diffstat (limited to 'extern/audaspace/src/sequence')
-rw-r--r--extern/audaspace/src/sequence/Sequence.cpp2
-rw-r--r--extern/audaspace/src/sequence/SequenceData.cpp2
-rw-r--r--extern/audaspace/src/sequence/SequenceEntry.cpp4
-rw-r--r--extern/audaspace/src/sequence/SequenceHandle.cpp8
-rw-r--r--extern/audaspace/src/sequence/SequenceHandle.h6
-rw-r--r--extern/audaspace/src/sequence/SequenceReader.cpp7
6 files changed, 14 insertions, 15 deletions
diff --git a/extern/audaspace/src/sequence/Sequence.cpp b/extern/audaspace/src/sequence/Sequence.cpp
index eaec4d84ae1..ab7e6e77857 100644
--- a/extern/audaspace/src/sequence/Sequence.cpp
+++ b/extern/audaspace/src/sequence/Sequence.cpp
@@ -90,7 +90,7 @@ AnimateableProperty* Sequence::getAnimProperty(AnimateablePropertyType type)
return m_sequence->getAnimProperty(type);
}
-std::shared_ptr<SequenceEntry> Sequence::add(std::shared_ptr<ISound> sound, float begin, float end, float skip)
+std::shared_ptr<SequenceEntry> Sequence::add(std::shared_ptr<ISound> sound, double begin, double end, double skip)
{
return m_sequence->add(sound, begin, end, skip);
}
diff --git a/extern/audaspace/src/sequence/SequenceData.cpp b/extern/audaspace/src/sequence/SequenceData.cpp
index fb920acc1a8..288f0bd225d 100644
--- a/extern/audaspace/src/sequence/SequenceData.cpp
+++ b/extern/audaspace/src/sequence/SequenceData.cpp
@@ -149,7 +149,7 @@ AnimateableProperty* SequenceData::getAnimProperty(AnimateablePropertyType type)
}
}
-std::shared_ptr<SequenceEntry> SequenceData::add(std::shared_ptr<ISound> sound, float begin, float end, float skip)
+std::shared_ptr<SequenceEntry> SequenceData::add(std::shared_ptr<ISound> sound, double begin, double end, double skip)
{
std::lock_guard<std::recursive_mutex> lock(m_mutex);
diff --git a/extern/audaspace/src/sequence/SequenceEntry.cpp b/extern/audaspace/src/sequence/SequenceEntry.cpp
index de538199d7d..b63bdd2ffca 100644
--- a/extern/audaspace/src/sequence/SequenceEntry.cpp
+++ b/extern/audaspace/src/sequence/SequenceEntry.cpp
@@ -22,7 +22,7 @@
AUD_NAMESPACE_BEGIN
-SequenceEntry::SequenceEntry(std::shared_ptr<ISound> sound, float begin, float end, float skip, int id) :
+SequenceEntry::SequenceEntry(std::shared_ptr<ISound> sound, double begin, double end, double skip, int id) :
m_status(0),
m_pos_status(1),
m_sound_status(0),
@@ -84,7 +84,7 @@ void SequenceEntry::setSound(std::shared_ptr<ISound> sound)
}
}
-void SequenceEntry::move(float begin, float end, float skip)
+void SequenceEntry::move(double begin, double end, double skip)
{
std::lock_guard<std::recursive_mutex> lock(m_mutex);
diff --git a/extern/audaspace/src/sequence/SequenceHandle.cpp b/extern/audaspace/src/sequence/SequenceHandle.cpp
index 140b1fbd94a..0437b05c85d 100644
--- a/extern/audaspace/src/sequence/SequenceHandle.cpp
+++ b/extern/audaspace/src/sequence/SequenceHandle.cpp
@@ -57,7 +57,7 @@ void SequenceHandle::start()
m_valid = m_handle.get();
}
-bool SequenceHandle::updatePosition(float position)
+bool SequenceHandle::updatePosition(double position)
{
std::lock_guard<ILockable> lock(*m_entry);
@@ -140,7 +140,7 @@ void SequenceHandle::stop()
m_3dhandle = nullptr;
}
-void SequenceHandle::update(float position, float frame, float fps)
+void SequenceHandle::update(double position, float frame, float fps)
{
if(m_sound_status != m_entry->m_sound_status)
{
@@ -229,7 +229,7 @@ void SequenceHandle::update(float position, float frame, float fps)
m_handle->setVolume(0);
}
-bool SequenceHandle::seek(float position)
+bool SequenceHandle::seek(double position)
{
if(!m_valid)
// sound not valid, aborting
@@ -240,7 +240,7 @@ bool SequenceHandle::seek(float position)
return false;
std::lock_guard<ILockable> lock(*m_entry);
- float seekpos = position - m_entry->m_begin;
+ double seekpos = position - m_entry->m_begin;
if(seekpos < 0)
seekpos = 0;
seekpos += m_entry->m_skip;
diff --git a/extern/audaspace/src/sequence/SequenceHandle.h b/extern/audaspace/src/sequence/SequenceHandle.h
index 9a77489a8f8..14a94365878 100644
--- a/extern/audaspace/src/sequence/SequenceHandle.h
+++ b/extern/audaspace/src/sequence/SequenceHandle.h
@@ -71,7 +71,7 @@ private:
* \param position Current playback position in seconds.
* \return Whether the handle is valid.
*/
- bool updatePosition(float position);
+ bool updatePosition(double position);
public:
/**
@@ -104,14 +104,14 @@ public:
* \param frame The current frame during playback.
* \param fps The animation frames per second.
*/
- void update(float position, float frame, float fps);
+ void update(double position, float frame, float fps);
/**
* Seeks the handle to a specific time position.
* \param position The time to seek to.
* \return Whether the handle is valid.
*/
- bool seek(float position);
+ bool seek(double position);
};
AUD_NAMESPACE_END
diff --git a/extern/audaspace/src/sequence/SequenceReader.cpp b/extern/audaspace/src/sequence/SequenceReader.cpp
index 38647aaeadf..c903e8ef42e 100644
--- a/extern/audaspace/src/sequence/SequenceReader.cpp
+++ b/extern/audaspace/src/sequence/SequenceReader.cpp
@@ -49,7 +49,7 @@ void SequenceReader::seek(int position)
for(auto& handle : m_handles)
{
- handle->seek(position / m_sequence->m_specs.rate);
+ handle->seek(position / (double)m_sequence->m_specs.rate);
}
}
@@ -150,13 +150,12 @@ void SequenceReader::read(int& length, bool& eos, sample_t* buffer)
Specs specs = m_sequence->m_specs;
int pos = 0;
- float time = float(m_position) / float(specs.rate);
+ double time = double(m_position) / double(specs.rate);
float volume, frame;
int len, cfra;
Vector3 v, v2;
Quaternion q;
-
while(pos < length)
{
frame = time * m_sequence->m_fps;
@@ -187,7 +186,7 @@ void SequenceReader::read(int& length, bool& eos, sample_t* buffer)
m_device.read(reinterpret_cast<data_t*>(buffer + specs.channels * pos), len);
pos += len;
- time += float(len) / float(specs.rate);
+ time += double(len) / double(specs.rate);
}
m_position += length;