Skip to content

Instantly share code, notes, and snippets.

/* firstNZsample.c - print time of first non-zero audio sample
*
* (C) 2009 Robin Gareus <[email protected]>
* GPLv2 https://www.gnu.org/licenses/gpl-2.0.html
*
* compile with:
* gcc -o firstNZsample firstNZsample.c -Wall -lsndfile
*/
#include <stdio.h>
#include <stdlib.h>
ardour {
["type"] = "dsp",
name = "Lua IR Capture and Convolver",
license = "MIT",
author = "Ardour Team",
description = [[Another DSP example]]
}
function dsp_ioconfig () return
{
#!/usr/bin/env python3
from gi.repository import GLib
import atexit
import dbus
import dbus.service
import dbus.mainloop.glib
class ScreenSaverProxy(dbus.service.Object):

Recommendations for Linux Plugin Vendors

Plugins should not rely on external (system-wide) resources, and must be statically linked (except for libc, libX11, and lib/server interfaces).

First of all, one cannot reply that a given compatible shared library is present on the target system. But the real issue however are ABI conflicts:

Say you have one plugin linking against system-wide libaubio.so.2 and another plugin using libaubio.so.3.

#!/usr/bin/python3
# https://pyusb.github.io/pyusb/ -- python3-usb
import usb.core
## Focusrite(R) Scarlett 18i6
device = usb.core.find(idVendor= 0x1235, idProduct=0x8004)
if device is None:
raise ValueError('Device not found')
@x42
x42 / .gitignore
Last active August 25, 2022 09:33
*.swp
*.lv2/
*-svg/
knob
knob.png
// g++ -o /tmp/sf_out sf_out.cc -Wall -lsndfile -lm
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <sndfile.h>
// g++ -o /tmp/sf_out sf_out.cc -Wall -lsndfile
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <sndfile.h>
int main (int argc, char** argv)
@x42
x42 / zenity
Created October 18, 2021 14:42
#!/bin/sh
unset LD_LIBRARY_PATH;
exec /usr/bin/zenity "$@"