projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Save LV2 presets with relative URIs to their own bundle, in the same style as Jalv.
[ardour.git]
/
libs
/
ardour
/
audio_port.cc
diff --git
a/libs/ardour/audio_port.cc
b/libs/ardour/audio_port.cc
index 9deda7a861d0dc329156cdd2e73054f211f17449..240224ea5e5b33112ae3e72f5e6c21ca5851eac8 100644
(file)
--- a/
libs/ardour/audio_port.cc
+++ b/
libs/ardour/audio_port.cc
@@
-20,10
+20,9
@@
#include "pbd/stacktrace.h"
#include "pbd/stacktrace.h"
+#include "ardour/audio_buffer.h"
#include "ardour/audio_port.h"
#include "ardour/audio_port.h"
-#include "ardour/audioengine.h"
#include "ardour/data_type.h"
#include "ardour/data_type.h"
-#include "ardour/audio_buffer.h"
using namespace ARDOUR;
using namespace std;
using namespace ARDOUR;
using namespace std;
@@
-45,19
+44,23
@@
AudioPort::cycle_start (pframes_t nframes)
{
/* caller must hold process lock */
{
/* caller must hold process lock */
+ Port::cycle_start (nframes);
+
if (sends_output()) {
_buffer->prepare ();
}
}
void
if (sends_output()) {
_buffer->prepare ();
}
}
void
-AudioPort::cycle_end (pframes_t
nframes
)
+AudioPort::cycle_end (pframes_t)
{
if (sends_output() && !_buffer->written()) {
{
if (sends_output() && !_buffer->written()) {
- /* we can't use nframes here because the current buffer capacity may
+ /* we can't use nframes here because the current buffer capacity may
be shorter than the full buffer size if we split the cycle.
*/
be shorter than the full buffer size if we split the cycle.
*/
- _buffer->silence (_buffer->capacity());
+ if (_buffer->capacity () > 0) {
+ _buffer->silence (_buffer->capacity());
+ }
}
}
}
}
@@
-67,16
+70,21
@@
AudioPort::cycle_split ()
}
AudioBuffer&
}
AudioBuffer&
-AudioPort::get_audio_buffer (
framecnt
_t nframes)
+AudioPort::get_audio_buffer (
pframes
_t nframes)
{
/* caller must hold process lock */
{
/* caller must hold process lock */
- _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, nframes) + _port_offset, nframes);
+ _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes) +
+ _global_port_buffer_offset + _port_buffer_offset, nframes);
return *_buffer;
}
return *_buffer;
}
-size_t
-AudioPort::
raw_buffer_size (pframes_t nframes) const
+Sample*
+AudioPort::
engine_get_whole_audio_buffer ()
{
{
- return nframes * sizeof (Sample);
+ /* caller must hold process lock */
+ return (Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes);
}
}
+
+
+