Skip to content

Instantly share code, notes, and snippets.

@mgeier
Last active December 26, 2015 22:39
Show Gist options
  • Save mgeier/7224433 to your computer and use it in GitHub Desktop.
Save mgeier/7224433 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import numpy as np
from scipy.io import wavfile
# SciPy >= 0.13 is needed for 32-bit floating point support
wavfile.write('stereo.wav', 44100, np.array([[1.0, -1.0],
[0.75, -0.75],
[0.5, -0.5],
[0.25, -0.25]], dtype='float32'))
LDLIBS = -lsndfile
all: rw_problem
clean:
$(RM) rw_problem
#include <sndfile.h>
int main() {
SF_INFO sfinfo;
SNDFILE* sf;
sf = sf_open("stereo.wav", SFM_RDWR, &sfinfo);
sf_close(sf);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment