#include <sys/stat.h>
#include <sys/mman.h>
+#include <sigc++/bind.h>
+
#include <pbd/error.h>
#include <pbd/basename.h>
#include <glibmm/thread.h>
using namespace ARDOUR;
using namespace PBD;
-jack_nframes_t Diskstream::disk_io_chunk_frames = 0;
+/* XXX This goes uninitialized when there is no ~/.ardour2 directory.
+ * I can't figure out why, so this will do for now (just stole the
+ * default from configuration_vars.h). 0 is not a good value for
+ * allocating buffer sizes..
+ */
+nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
-sigc::signal<void,Diskstream*> Diskstream::DiskstreamCreated;
-sigc::signal<void,list<Source*>*> Diskstream::DeleteSources;
sigc::signal<void> Diskstream::DiskOverrun;
sigc::signal<void> Diskstream::DiskUnderrun;
void
Diskstream::init (Flag f)
{
- _refcnt = 0;
_flags = f;
_io = 0;
_alignment_style = ExistingMaterial;
if (_seek_required) {
if (speed() != 1.0f || speed() != -1.0f) {
- seek ((jack_nframes_t) (_session.transport_frame() * (double) speed()), true);
+ seek ((nframes_t) (_session.transport_frame() * (double) speed()), true);
}
else {
seek (_session.transport_frame(), true);
if (new_speed != _actual_speed) {
- jack_nframes_t required_wrap_size = (jack_nframes_t) floor (_session.get_block_size() *
+ nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() *
fabs (new_speed)) + 1;
if (required_wrap_size > wrap_buffer_size) {
return 0;
}
-jack_nframes_t
+nframes_t
Diskstream::get_capture_start_frame (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
}
-jack_nframes_t
+nframes_t
Diskstream::get_captured_frames (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
void
-Diskstream::set_roll_delay (jack_nframes_t nframes)
+Diskstream::set_roll_delay (nframes_t nframes)
{
_roll_delay = nframes;
}
reset_write_sources (false);
}
- plstate_connection = _playlist->StateChanged.connect (mem_fun (*this, &Diskstream::playlist_changed));
plmod_connection = _playlist->Modified.connect (mem_fun (*this, &Diskstream::playlist_modified));
- plgone_connection = _playlist->GoingAway.connect (mem_fun (*this, &Diskstream::playlist_deleted));
+ plgone_connection = _playlist->GoingAway.connect (bind (mem_fun (*this, &Diskstream::playlist_deleted), _playlist));
}
if (!overwrite_queued) {