1

I'm building a guitar tuner using Pure Data audio (https://github.com/libpd/pd-for-android).

The problem is when I add <service android:name="org.puredata.android.service.PdService" /> in manifest, the app closes after I open in android emulator without errors. But it works on my real device. Any ideas what is wrong?

The service code:

private final ServiceConnection pdConnection = new ServiceConnection() {
    @Override
    public void onServiceConnected(ComponentName name, IBinder service) {
        pdService = ((PdService.PdBinder) service).getService();
        try {
            initPd();
            loadPatch();
        } catch (IOException e) {
            Log.e(TAG, e.toString()); //unable to open Pd audio: 44100, 1, 2
            finish(); // emulator always here.
        }
    }

In gradle I have this:

ndk {
    abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
}

and

implementation 'org.puredata.android:pd-core:1.1.0'

Thanks a lot.

Son Truong
  • 13,661
  • 5
  • 32
  • 58
RGS
  • 4,062
  • 4
  • 31
  • 67
  • This might be a problem with the emulator's microphone, and if it is, then it is not a libpd specific problem. To eliminate this option, I would try to answer the following: 1. Can you record audio with other apps on the emulator? 2. The PdTest sample app in the `pd-for-android` project also tests the microphone. Does the PdTest microphone test work on the emulator? – kirsh300 Dec 17 '20 at 09:04

0 Answers0