Apple Silicon support for LibPdInstance.cs
This commit is contained in:
parent
ff774f3e45
commit
add0a7351a
1 changed files with 9 additions and 8 deletions
|
|
@ -507,6 +507,14 @@ public class LibPdInstance : MonoBehaviour
|
||||||
/// Initialise LibPd.
|
/// Initialise LibPd.
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
|
//Initialise libpd if possible, report any errors.
|
||||||
|
int initErr = libpd_queued_init();
|
||||||
|
if (initErr != 0)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("Warning; libpd_init() returned " + initErr);
|
||||||
|
Debug.LogWarning("(if you're running this in the editor that probably just means this isn't the first time you've run your game, and is not a problem)");
|
||||||
|
}
|
||||||
|
|
||||||
//Initialise libpd, if it's not already.
|
//Initialise libpd, if it's not already.
|
||||||
if (!pdInitialised)
|
if (!pdInitialised)
|
||||||
{
|
{
|
||||||
|
|
@ -550,13 +558,6 @@ public class LibPdInstance : MonoBehaviour
|
||||||
midiByteHook = new LibPdMidiByteHook(MidiByteOutput);
|
midiByteHook = new LibPdMidiByteHook(MidiByteOutput);
|
||||||
libpd_set_queued_midibytehook(midiByteHook);
|
libpd_set_queued_midibytehook(midiByteHook);
|
||||||
|
|
||||||
//Initialise libpd if possible, report any errors.
|
|
||||||
int initErr = libpd_queued_init();
|
|
||||||
if(initErr != 0)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("Warning; libpd_init() returned " + initErr);
|
|
||||||
Debug.LogWarning("(if you're running this in the editor that probably just means this isn't the first time you've run your game, and is not a problem)");
|
|
||||||
}
|
|
||||||
pdInitialised = true;
|
pdInitialised = true;
|
||||||
|
|
||||||
//Try and add the patch directory to libpd's search path for
|
//Try and add the patch directory to libpd's search path for
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue