X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Flua_api.cc;h=001ddc11bf2ffb798693be7c178a49a6b712f7bc;hb=dec10f2f3c6fffe27e72243d9bf36713d8f084f9;hp=42f270e4521dc39af084a3aeeff351b6f7367d7f;hpb=601c317d70a03190257577bd867cefc2c70d3275;p=ardour.git diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index 42f270e452..001ddc11bf 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -343,7 +343,7 @@ ARDOUR::LuaAPI::sample_to_timecode_lua (lua_State *L) sample, timecode, false, false, s->timecode_frames_per_second (), s->timecode_drop_frames (), - s->frame_rate (), + s->sample_rate (), 0, false, 0); luabridge::Stack::push (L, timecode.hours); @@ -379,7 +379,7 @@ ARDOUR::LuaAPI::timecode_to_sample_lua (lua_State *L) Timecode::timecode_to_sample ( timecode, sample, false, false, - s->frame_rate (), + s->sample_rate (), 0, false, 0); luabridge::Stack::push (L, sample); @@ -729,7 +729,7 @@ LuaAPI::Vamp::Vamp (const std::string& key, float sample_rate) if (bs > 0 && ss > 0 && bs <= 8192 && ss <= 8192) { _bufsize = bs; - _stepsize = bs; + _stepsize = ss; } } @@ -774,12 +774,12 @@ LuaAPI::Vamp::analyze (boost::shared_ptr r, uint32_t channel, float* data = new float[_bufsize]; float* bufs[1] = { data }; - framecnt_t len = r->readable_length(); - framepos_t pos = 0; + samplecnt_t len = r->readable_length(); + samplepos_t pos = 0; int rv = 0; while (1) { - framecnt_t to_read = std::min ((len - pos), _bufsize); + samplecnt_t to_read = std::min ((len - pos), _bufsize); if (r->read (data, pos, to_read, channel) != to_read) { rv = -1; break; @@ -815,16 +815,16 @@ LuaAPI::Vamp::process (const std::vector& d, ::Vamp::RealTime rt) return _plugin->process (bufs, rt); } -boost::shared_ptr > -LuaAPI::new_noteptr (uint8_t chan, Evoral::Beats beat_time, Evoral::Beats length, uint8_t note, uint8_t velocity) +boost::shared_ptr > +LuaAPI::new_noteptr (uint8_t chan, Temporal::Beats beat_time, Temporal::Beats length, uint8_t note, uint8_t velocity) { - return boost::shared_ptr > (new Evoral::Note(chan, beat_time, length, note, velocity)); + return boost::shared_ptr > (new Evoral::Note(chan, beat_time, length, note, velocity)); } -std::list > > +std::list > > LuaAPI::note_list (boost::shared_ptr mm) { - typedef boost::shared_ptr > NotePtr; + typedef boost::shared_ptr > NotePtr; std::list note_ptr_list;