Skip to content

Instantly share code, notes, and snippets.

View takaswie's full-sized avatar

坂本 貴史 takaswie

View GitHub Profile
@takaswie
takaswie / install-signal-handler.rs
Created December 6, 2019 03:48
A Rust sample to install signal handler to quit event loop.
extern crate nix;
extern crate libc;
use nix::sys::signal;
use std::sync::atomic::{AtomicBool, Ordering};
static RUNNING: AtomicBool = AtomicBool::new(false);
extern "C" fn handle(_: libc::c_int, _: *mut libc::siginfo_t,
_: *mut libc::c_void) {
@takaswie
takaswie / async-op.c
Created April 5, 2019 13:57
A sample of async operation of GLib.
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdio.h>
#include <stdlib.h>
typedef int CakeFlavor;
typedef int CakeFrostingType;
@takaswie
takaswie / pcm-capture-threshold-test.c
Created October 29, 2018 08:57
pcm-capture-threshold-test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <poll.h>
#include <alsa/asoundlib.h>
@takaswie
takaswie / sample.py
Last active October 7, 2018 14:05
A sample Python 3 script for a new SndTscm object for new features of firewire-tascam driver
#!/usr/bin/env python3
from sys import exit
from time import sleep
import gi
gi.require_version('Hinawa', '2.0')
from gi.repository import Hinawa
unit = Hinawa.SndTscm()
@takaswie
takaswie / onemix-entries.txt
Created August 13, 2018 15:25
Output of efibootmgr on One Mix
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0006,0000,0002,0005
Boot0000* Windows Boot Manager HD(1,GPT,fcfdba89-71af-4068-8a6c-ed765606a95e,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* Other Boot Item HD(5,GPT,048e20ad-0f20-42d4-a1b4-1fd64e84200c,0xe735800,0x1c2000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005* UEFI: Built-in EFI Shell VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0006* UEFI: 1.00, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(7,0)/HD(1,MBR,0x663eb4c4,0x3906b4,0x1240)..BO
@takaswie
takaswie / focusrite-saffire_pro_26.log
Created March 15, 2018 00:13
Focusrite Saffire Pro 26
{'router': {'is-exposed': True, 'is-readonly': False, 'is-storable': True, 'maximum-routes': 128}, 'mixer': {'is-exposed': True, 'is-readonly': False, 'is-storable': True, 'input-device-id': 2, 'output-device-id': 2, 'input-channels': 18, 'output-channels': 16}, 'general': {'dynamic-stream-conf': True, 'available-storage': True, 'available-peak': True, 'maximum-tx-streams': 2, 'maximum-rx-streams': 2, 'storable-stream-conf': True, 'asic_type': 'TCD-2220'}, 'reserved': bytearray(b'\x00\x00\x00\x00')}
0 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 0, 'dst-blk': 'avs-0', 'dst-ch': 0}
1 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 1, 'dst-blk': 'avs-0', 'dst-ch': 1}
2 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 2, 'dst-blk': 'avs-0', 'dst-ch': 2}
3 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 3, 'dst-blk': 'avs-0', 'dst-ch': 3}
4 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 4, 'dst-blk': 'avs-0', 'dst-ch': 4}
5 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 5, 'dst-blk': 'avs-0', 'dst-ch': 5}
6 {'peak': 0, 'src-blk': 'aes', 'src-ch': 4,
@takaswie
takaswie / presonus-firestudio_mobile.log
Created March 15, 2018 00:12
PreSonus FireStudio Mobile
{'router': {'is-exposed': True, 'is-readonly': False, 'is-storable': True, 'maximum-routes': 128}, 'mixer': {'is-exposed': True, 'is-readonly': False, 'is-storable': True, 'input-device-id': 2, 'output-device-id': 2, 'input-channels': 18, 'output-channels': 16}, 'general': {'dynamic-stream-conf': True, 'available-storage': True, 'available-peak': True, 'maximum-tx-streams': 1, 'maximum-rx-streams': 1, 'storable-stream-conf': True, 'asic_type': 'TCD-2210'}, 'reserved': bytearray(b'\x00\x00\x00\x00')}
0 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 0, 'dst-blk': 'avs-0', 'dst-ch': 0}
1 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 1, 'dst-blk': 'avs-0', 'dst-ch': 1}
2 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 2, 'dst-blk': 'avs-0', 'dst-ch': 2}
3 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 3, 'dst-blk': 'avs-0', 'dst-ch': 3}
4 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 4, 'dst-blk': 'avs-0', 'dst-ch': 4}
5 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 5, 'dst-blk': 'avs-0', 'dst-ch': 5}
6 {'peak': 0, 'src-blk': 'ins0', 'src-ch': 6,
@takaswie
takaswie / mr816x-ext-regs.log
Last active February 7, 2018 17:41
address spaces of MR816x in external FX mode
A
0000ffffe00070ec: 00000000
0000ffffe00070f0: 00000000
0000ffffe00070f4: 00000000
0000ffffe00070f8: 00000000
0000ffffe00070fc: 00000000
0000ffffe0007100: 00000000
0000ffffe0007104: 00000000
0000ffffe0007108: 00000000
0000ffffe000710c: 00000000
@takaswie
takaswie / n8-a-section.log
Created February 5, 2018 14:18
A section on n8 address space.
A
0000ffffe00011a8: 00000000
0000ffffe00011ac: 00000000
0000ffffe00011b0: 00000000
0000ffffe00011b4: 00000000
0000ffffe00011b8: 00000000
0000ffffe00011bc: 00000000
0000ffffe00011c0: 00000000
0000ffffe00011c4: 00000000
0000ffffe00011c8: 00000000
@takaswie
takaswie / mr816x-structure.log
Created January 2, 2018 03:47
Steinberg MR816x address space structure.
Region A:
0000ffffe000713c:
00: 00000000
01: 00000000
02: 00000000
03: 00000000
04: 00000000
80000004
0000708c
00: 00000001