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

failing to run some externals #67

Open
porres opened this issue Jul 4, 2017 · 8 comments
Open

failing to run some externals #67

porres opened this issue Jul 4, 2017 · 8 comments

Comments

@porres
Copy link

porres commented Jul 4, 2017

howdy, I've been testing libpd for android and some externals. I've managed to use pd's extra objects as well as a few objects from cyclone and also from another library of my own.

But the thing is that some externals will fail, and they're pretty simple so I can't see any reason why they fail, here's one I couldn't run, for instance: https://github.com/porres/pd-else/blob/master/classes/gbman~.c

What should I know or be careful about building external objects for android?

how can I get more information about my problem?

the object does compile and create and everything, I just do not hear any sound!

cheers

@porres porres changed the title failing to build some externals failing to run some externals Jul 4, 2017
@tkirshboim
Copy link
Member

tkirshboim commented Jul 24, 2017

Hey @porres , can you maybe provide an example project using this external? It would make it easier to try and debug the problem.

@porres
Copy link
Author

porres commented Jul 24, 2017

hi, gbman~ is a chaotic signal generator

so you can have something as simple as

[gbman~]
|
[*~ 0.1]
|
[dac~]

@joebowbeer
Copy link
Contributor

joebowbeer commented Jul 24, 2017

@porres Please provide a link to an Android project. Preferably one that depends on JCenter's pd-for-android library artifact.

@mgsx-dev
Copy link

Seams to be related to libpd/libpd#130. You may need the LOCALE option in your compilation ... something messing with float parsing .... see https://github.com/libpd/libpd#known-issues

Note : You can quickly confirm this is related by replacing *~ 0.3 by *~ 1 or replacing gbman~ by a noise~ in your patch.

@esantossilva
Copy link

esantossilva commented Jul 25, 2017

Hi @joebowbeer,
I'm working alongside @porres in the Android Project and we're using the PdTest from pd-for-android as a base app. We simply cloned the repository and modified the pd patch usign other externals, like the [gbman~].

We put the gbman~.c file in the jni folder and modified the Android.mk like so:

LOCAL_PATH := $(call my-dir)

#---------------------------------------------------------------

include $(CLEAR_VARS)
LOCAL_MODULE := pd
LOCAL_EXPORT_C_INCLUDES := ../../PdCore/jni/libpd/pure-data/src
LOCAL_SRC_FILES := ../../PdCore/libs/$(TARGET_ARCH_ABI)/libpd.so
ifneq ($(MAKECMDGOALS),clean)
    include $(PREBUILT_SHARED_LIBRARY)
endif

#---------------------------------------------------------------

include $(CLEAR_VARS)
LOCAL_MODULE := gbman_tilde
LOCAL_CFLAGS := -DPD
LOCAL_SRC_FILES := gbman~.c
LOCAL_SHARED_LIBRARIES = pd
include $(BUILD_SHARED_LIBRARY)
#---------------------------------------------------------------

As @porres mentioned, this worked fine for some externals (like cyclone's pink~), but didn't work for others...

thanks for the help.

@joebowbeer
Copy link
Contributor

Assuming this is due to not setting numeric LOCALE, Android needs to sync with recent commit?

libpd/libpd@2b358fb

@mgsx-dev
Copy link

mgsx-dev commented Jul 25, 2017

@joebowbeer no needs to sync for now :

  • with current andoid version, you just need to compile libpd with SETLOCALE=true option.
  • when you will sync android with latest libpd, you won't have to put any options (the recent commit in libpd just make this option the default) .

@porres @esantossilva could you add locale option in your make file ? : LOCAL_CFLAGS := -DPD -DLIBPD_SETLOCALE that would confirms this is related.

@esantossilva
Copy link

@mgsx-dev still the same. I tried modifying the Android.mk file and then I tried the Makefile for libpd and it remains the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants