Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libprojectm4 and ui-jack compiler errors #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/qprojectm_mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void QProjectM_MainWindow::postProjectM_Initialize()
if ((playlistFile = qSettings.value("PlaylistFile", QString()).toString()) == QString())
{
auto projectMSettings = projectm_get_settings(qprojectM()->instance());
url = QString(projectMSettings->preset_path);
url = QString(projectMSettings->preset_url);
projectm_free_settings(projectMSettings);
}
else
Expand Down
8 changes: 4 additions & 4 deletions src/common/qprojectmconfigdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ void QProjectMConfigDialog::saveConfig() {
// Will only keep data_dir.
auto settings = projectm_get_settings(_qprojectMWidget->qprojectM()->instance());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum... projectm_get_settings() didn't make it into the 4.0 release, the whole settings struct is gone and was replaced by get/set calls.

Better try compiling against the 4.0 release or current master of libprojectM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I am? See this output:

(base) carm@blackmage:~/projects/frontend-qt$ ldd src/ui-jack/projectM-jack |grep projectM
        libprojectM.so.4 => /usr/local/lib/libprojectM.so.4 (0x00007fce9bc00000)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .so version is about misleading as it's just counted up, and not really related to the version number. The filename of projectM 4 is different though, it's named libprojectM-4.so. The include dirs also are prefixed with a projectM-4 path.

Just try to build the Qt app against latest projectM master, making sure no libs/headers of older versions are still in you system paths.


projectm_free_string(settings->preset_path);
projectm_free_string(settings->preset_url);

settings->mesh_x = _ui.meshSizeWidthSpinBox->value();
settings->mesh_y = _ui.meshSizeHeightSpinBox->value();
settings->window_height = _ui.windowHeightSpinBox->value();
settings->window_width = _ui.windowWidthSpinBox->value();
settings->preset_path = projectm_alloc_string(_ui.startupPlaylistDirectoryLineEdit->text().length() + 1);
strncpy(settings->preset_path, _ui.startupPlaylistDirectoryLineEdit->text().toLocal8Bit().data(), _ui.startupPlaylistDirectoryLineEdit->text().length());
settings->preset_url = projectm_alloc_string(_ui.startupPlaylistDirectoryLineEdit->text().length() + 1);
strncpy(settings->preset_url, _ui.startupPlaylistDirectoryLineEdit->text().toLocal8Bit().data(), _ui.startupPlaylistDirectoryLineEdit->text().length());
settings->texture_size = _ui.textureSizeComboBox->itemData(_ui.textureSizeComboBox->currentIndex()).toInt();
settings->soft_cut_duration = _ui.smoothPresetDurationSpinBox->value();
settings->preset_duration = _ui.presetDurationSpinBox->value();
Expand Down Expand Up @@ -175,7 +175,7 @@ void QProjectMConfigDialog::loadConfig() {
_ui.meshSizeWidthSpinBox->setValue(settings->mesh_x);
_ui.meshSizeHeightSpinBox->setValue(settings->mesh_y);

_ui.startupPlaylistDirectoryLineEdit->setText(settings->preset_path);
_ui.startupPlaylistDirectoryLineEdit->setText(settings->preset_url);
_ui.useAspectCorrectionCheckBox->setCheckState(settings->aspect_correction ? Qt::Checked : Qt::Unchecked);
_ui.maxFPSSpinBox->setValue(settings->fps);
_ui.beatSensitivitySpinBox->setValue(settings->beat_sensitivity);
Expand Down
2 changes: 1 addition & 1 deletion src/ui-jack/qprojectM-jack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ process (jack_nframes_t nframes, void *arg)

//memcpy (out, in,sizeof (jack_default_audio_sample_t) * nframes);

projectm_pcm_add_float_1ch_data(globalPM, in, nframes);
projectm_pcm_add_float(globalPM, in, nframes, PROJECTM_MONO);
// printf("%x %f\n",nframes,in[128]);

return 0;
Expand Down