[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38856] branches/soc-2011-pepper/intern/ audaspace: 3D Audio GSoC:
Joerg Mueller
nexyon at gmail.com
Sat Jul 30 18:24:12 CEST 2011
Revision: 38856
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38856
Author: nexyon
Date: 2011-07-30 16:24:11 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
3D Audio GSoC:
* Fix for sequencer strip IDs, only one strip played.
* Fix for PyAPI sample rate.
* Enhanced Double Reader to return more data if possible.
Modified Paths:
--------------
branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.cpp
branches/soc-2011-pepper/intern/audaspace/Python/AUD_PyAPI.cpp
branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerEntry.cpp
Modified: branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.cpp
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.cpp 2011-07-30 15:45:27 UTC (rev 38855)
+++ branches/soc-2011-pepper/intern/audaspace/FX/AUD_DoubleReader.cpp 2011-07-30 16:24:11 UTC (rev 38856)
@@ -88,7 +88,24 @@
if(!m_finished1)
{
- m_reader1->read(length, m_finished1, buffer);
+ int len = length;
+
+ m_reader1->read(len, m_finished1, buffer);
+
+ if(len < length)
+ {
+ AUD_Specs specs1, specs2;
+ specs1 = m_reader1->getSpecs();
+ specs2 = m_reader2->getSpecs();
+ if(memcmp(&specs1, &specs2, sizeof(AUD_Specs)))
+ length = len;
+ else
+ {
+ int len2 = length - len;
+ m_reader2->read(len2, eos, buffer + specs1.channels * len);
+ length = len + len2;
+ }
+ }
}
else
{
Modified: branches/soc-2011-pepper/intern/audaspace/Python/AUD_PyAPI.cpp
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/Python/AUD_PyAPI.cpp 2011-07-30 15:45:27 UTC (rev 38855)
+++ branches/soc-2011-pepper/intern/audaspace/Python/AUD_PyAPI.cpp 2011-07-30 16:24:11 UTC (rev 38856)
@@ -144,9 +144,9 @@
Factory_sine(PyTypeObject* type, PyObject* args)
{
float frequency;
- int rate = 44100;
+ double rate = 44100;
- if(!PyArg_ParseTuple(args, "f|i:sine", &frequency, &rate))
+ if(!PyArg_ParseTuple(args, "f|d:sine", &frequency, &rate))
return NULL;
Factory *self;
@@ -2313,7 +2313,7 @@
try
{
AUD_DeviceSpecs specs = (*reinterpret_cast<AUD_Reference<AUD_IDevice>*>(self->device))->getSpecs();
- return Py_BuildValue("i", specs.rate);
+ return Py_BuildValue("d", specs.rate);
}
catch(AUD_Exception& e)
{
Modified: branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerEntry.cpp
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerEntry.cpp 2011-07-30 15:45:27 UTC (rev 38855)
+++ branches/soc-2011-pepper/intern/audaspace/intern/AUD_SequencerEntry.cpp 2011-07-30 16:24:11 UTC (rev 38856)
@@ -39,7 +39,7 @@
m_status(0),
m_pos_status(1),
m_sound_status(0),
- m_id(0),
+ m_id(id),
m_sound(sound),
m_begin(begin),
m_end(end),
More information about the Bf-blender-cvs
mailing list