public static void loadPatch() { SDllHandle = LoadLibrary("libpdcsharp.dll"); LibPD.ReInit(); LibPD.OpenAudio(2, 3, 44100); SPatch = LibPD.OpenPatch(@"..\..\test_csharp.pd"); LibPD.ComputeAudio(true); }
public static void loadPatch() { if (loader == null) { loader = IsLinux() ? (IDllLoader) new LinuxDllLoader() : (IDllLoader) new WindowsDllLoader(); } SDllHandle = loader.LoadLibrary("libpdcsharp." + (IsLinux() ? "so" : "dll")); LibPD.ReInit(); LibPD.OpenAudio(2, 3, 44100); SPatch = LibPD.OpenPatch(@"../../test_csharp.pd"); LibPD.ComputeAudio(true); }
// Startup audio engine public static void Startup() { LibPD.ReInit(); LibPD.Print += printCallback; LibPD.Float += floatCallback; LibPD.Bang += bangCallback; LibPD.OpenAudio(1, 2, 44100); LibPD.ComputeAudio(true); handle = LibPD.OpenPatch("patch/soundsystem.pd"); PortAudio.Pa_Initialize(); PortAudio.Pa_OpenDefaultStream(out stream, 1, 2, (uint)PortAudio.PaSampleFormat.paFloat32, 44100, 256, renderCallback, (IntPtr)null); PortAudio.Pa_StartStream(stream); }