[xiph-commits] r18813 - in trunk/Xiph-episode-II: bounce cairo
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sun Feb 24 14:22:51 PST 2013
Author: xiphmont
Date: 2013-02-24 14:22:51 -0800 (Sun, 24 Feb 2013)
New Revision: 18813
Modified:
trunk/Xiph-episode-II/bounce/gtk-bounce-audio.c
trunk/Xiph-episode-II/bounce/gtk-bounce-filter.c
trunk/Xiph-episode-II/bounce/gtk-bounce-widget.c
trunk/Xiph-episode-II/bounce/twopole.c
trunk/Xiph-episode-II/cairo/README
Log:
Clean up some comments in the episodeII source
Modified: trunk/Xiph-episode-II/bounce/gtk-bounce-audio.c
===================================================================
--- trunk/Xiph-episode-II/bounce/gtk-bounce-audio.c 2013-02-24 22:04:10 UTC (rev 18812)
+++ trunk/Xiph-episode-II/bounce/gtk-bounce-audio.c 2013-02-24 22:22:51 UTC (rev 18813)
@@ -6,23 +6,27 @@
extern int header_out(FILE *out, int rate, int bits, int channels);
+/* hardware buffering and latency parameters */
static snd_pcm_uframes_t pframes = 128;
static snd_pcm_uframes_t pframes_mark = 128*8;
static snd_pcm_uframes_t bframes = 4096;
-/* only apply to ch0 and ch1 */
-
+/* only apply noise shaping to ch0 and ch1 */
static shapestate shapestate_ch0;
static shapestate shapestate_ch1;
+/* aIIR and FIR filters */
static notchfilter *notch[2]={0,0};
static convofilter *lowpass;
static convostate *lowpass_state[2]={0,0};
+
+/* filter tracking state; allows soft-on/off behavior */
static int active_1kHz_notch;
static int active_lp_filter;
static int state_1kHz_modulation = 0;
static float amplitude_1kHz_modmix = 0;
+/* direct-to-ALSA setup */
static int param_setup_i(snd_pcm_t *devhandle, int dir, int rate,
int format, int channels){
int ret;
@@ -152,8 +156,8 @@
int bits, int *channels){
/* The eMagic 2|6 only does 24 bit playback if also using 6
- channels. The Focusrite Scarlett 2i2 can only do 32 bit
- output */
+ channels. Some newer DACs like the Focusrite Scarlett 2i2 can
+ only do 32 bit output. Try 'em all, we can convert. */
int format_list[3] = {SND_PCM_FORMAT_S16_LE,
SND_PCM_FORMAT_S24_3LE,
SND_PCM_FORMAT_S32_LE};
Modified: trunk/Xiph-episode-II/bounce/gtk-bounce-filter.c
===================================================================
--- trunk/Xiph-episode-II/bounce/gtk-bounce-filter.c 2013-02-24 22:04:10 UTC (rev 18812)
+++ trunk/Xiph-episode-II/bounce/gtk-bounce-filter.c 2013-02-24 22:22:51 UTC (rev 18813)
@@ -461,6 +461,8 @@
return 1;
}
+/* the below was just for testing and calibration of the hand-drawn
+ filters while I was assembling them */
#if 0
#define fromdB(x) (exp((x)*.11512925f))
int main(int argc, char **argv){
Modified: trunk/Xiph-episode-II/bounce/gtk-bounce-widget.c
===================================================================
--- trunk/Xiph-episode-II/bounce/gtk-bounce-widget.c 2013-02-24 22:04:10 UTC (rev 18812)
+++ trunk/Xiph-episode-II/bounce/gtk-bounce-widget.c 2013-02-24 22:22:51 UTC (rev 18813)
@@ -1,13 +1,15 @@
#include "gtk-bounce.h"
#include "gtk-bounce-widget.h"
-/* implement a peudowidget (rowwidget) for most entries in the panel */
+/* implement a pseudowidget (rowwidget) for most entries in the panel.
+ We want a darm gtk3-ish look, though we're actually using gtk2. */
/* Because we're in a GtkFixed that's being scrolled around, but
drawing is being done to the GdkWindow owned by the toplevel, the
clip region is set incorrectly to allow us to overdraw things in
the toplevel outside our parents' bounds. Follow the tree up and
reclip. */
+
static void narrow_clip(GtkWidget *w,GdkRectangle *area){
int x1 = w->allocation.x;
int y1 = w->allocation.y;
Modified: trunk/Xiph-episode-II/bounce/twopole.c
===================================================================
--- trunk/Xiph-episode-II/bounce/twopole.c 2013-02-24 22:04:10 UTC (rev 18812)
+++ trunk/Xiph-episode-II/bounce/twopole.c 2013-02-24 22:22:51 UTC (rev 18813)
@@ -1,4 +1,4 @@
-/* specific filter recipes with thanks to Alex Matulich
+/* specific two-pole filter recipes with thanks to Alex Matulich
http://unicorn.us.com/alex/2polefilters.html */
#include <math.h>
Modified: trunk/Xiph-episode-II/cairo/README
===================================================================
--- trunk/Xiph-episode-II/cairo/README 2013-02-24 22:04:10 UTC (rev 18812)
+++ trunk/Xiph-episode-II/cairo/README 2013-02-24 22:22:51 UTC (rev 18813)
@@ -11,4 +11,9 @@
ch4-samplequant.c also requires the 'squishyio' library from Xiph.org
SVN and the commandline:
-gcc ch4-samplequant.c -o ch4-samplequant -lm -lcairo -lfftw3f -lsquishyio
\ No newline at end of file
+gcc ch4-samplequant.c -o ch4-samplequant -lm -lcairo -lfftw3f -lsquishyio
+
+The source is mostly cut-and-paste spaghetti of the worst kind.
+However, it wasn't intended to be used at any point in the future,
+just spit out some images and done. So... point and laugh if you
+like, but try not to rupture anything. It's not worth it!
\ No newline at end of file
More information about the commits
mailing list