This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define BUF_SIZE 5 | |
// the buffer works like a stack for | |
// the sake of simplicity, if needed | |
// we may implement a queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
readmp3.c | |
Copyright (c) 2012, Jeremiah LaRocco [email protected] | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above | |
copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Java wrapper for FFTW3 using Java Native Access (JNA) | |
// Author: Kipton Barros | |
// | |
package fftw3; | |
// This file was automatically generated with JNAerator the command: | |
// java -jar jnaerator-0.9.7.jar -library FFTW3 /usr/local/include/fftw3.h -o . -v -noJar -noComp -noPrimitiveArrays -noMangling -structsInLibrary -runtime JNA -sizeAsLong -Dfftw_complex=double -Dfftwf_complex=float | |
// I made some small manual modifications, essentially to remove unneeded JNAerator dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ColorMatrixColorFilter setContrast(float contrast) { | |
float scale = contrast + 1.f; | |
float translate = (-.5f * scale + .5f) * 255.f; | |
float[] array = new float[] { | |
scale, 0, 0, 0, translate, | |
0, scale, 0, 0, translate, | |
0, 0, scale, 0, translate, | |
0, 0, 0, 1, 0}; | |
ColorMatrix matrix = new ColorMatrix(array); | |
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <mmreg.h> | |
#include <msacm.h> | |
#define MP3_BLOCK_SIZE 522 | |
#define SOURCE_MP3 "C:\\audiograbber\\At The Club Last Night\\At_The_Club_Last_Night_-_Haven't_You_Heard.mp3" | |
#define OUTPUT_PCM_FILE "c:\\dump.pcm" |
NewerOlder