Skip to content

Instantly share code, notes, and snippets.

@shamangeorge
Created October 18, 2015 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamangeorge/fec82132663239999792 to your computer and use it in GitHub Desktop.
Save shamangeorge/fec82132663239999792 to your computer and use it in GitHub Desktop.
Audio routines
#!/bin/bash
/opt/vhl/ffmpeg/bin/ffmpeg -i audio.in -ac 1 -acodec pcm_s16le -ar 16000 audio.out
for(int i = 0; i < sound.frames; i++)
{
audioOut[i] = 0;
for(int j = 0; j < sound.channels; j++)
audioOut[i] += audioIn[i*sound.channels + j];
audioOut[i] /= sound.channels;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment