Skip to content

Commit

Permalink
[pd] update with libpd
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jan 22, 2024
1 parent fabbab1 commit ee98c25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/plugins/score-plugin-pd/Pd/Executor/PdExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ PdGraphNode::PdGraphNode(
// Set-up message callbacks
libpd_set_printhook([](const char* s) { qDebug() << "[pd: print] " << s; });

SCORE_ASSERT(pd_this);
libpd_set_floathook([](const char* recv, float f) {
if(auto v = m_currentInstance->get_value_port(recv))
{
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/score-plugin-pd/Pd/PdProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ namespace Pd
{
Instance::Instance()
{
instance = pdinstance_new();
instance = libpd_new_instance();
}

Instance::~Instance()
{
pdinstance_free(instance);
libpd_free_instance(instance);
}

static const auto& initTypeMap()
Expand Down Expand Up @@ -883,7 +883,7 @@ void ProcessModel::setScript(const QString& script)
outletsChanged();
}
// Create instance
pd_setinstance(m_instance->instance);
libpd_set_instance(m_instance->instance);

if(m_instance->file_handle)
libpd_closefile(m_instance->file_handle);
Expand Down

0 comments on commit ee98c25

Please sign in to comment.