Skip to content

Instantly share code, notes, and snippets.


Ronald Nicholson hotpaw2

View GitHub Profile
hotpaw2 / ToneOutputUnit.swift
Last active Aug 1, 2022
Swift 3 Audio class that can play a simple tone on an iOS device
View ToneOutputUnit.swift
// ToneOutputUnit.swift
// This is a Swift 3 class (which should be instantiated as a singleton object)
// that can play a single tone of arbitrary tone and frequency on iOS devices
// using run-time sinewave synthesis and the Audio Unit v3 API with RemoteIO.
// Created by Ronald Nicholson on 2/20/2016.
// revised 2016-Sep-08 for Swift 3
View sieve.c
/* sieve.c */
/* An old small benchmark from Byte Magazine, circa 1983 and 1984, thus suitable for that vintage of computer. */
#include <stdio.h>
#define TIMES (100000L)
static unsigned char f[8192];
int main()