Skip to content

Instantly share code, notes, and snippets.

@datajake1999
datajake1999 / read-dls.py
Last active July 25, 2020 06:46 — forked from McMartin/read-dls.py
Read DLS file using Python
import struct
import sys
from chunk import Chunk
FOURCC_DLS = b'DLS '
FOURCC_DLID = b'dlid'
FOURCC_COLH = b'colh'
FOURCC_WVPL = b'wvpl'
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
void GenerateTone(double frequency, double sampleRate, double amplitude, double fadeTime, double *buffer, int length)
{
double phase;