(Previous mail got lost because of wrong From: address, I guess. So I'm
reposting it. Sorry for the inconvenience!)
Hi all!
Wondering if someone out there is still using Postfish. Well, at least I am
still using it.
Sometimes it's handy to know which input channel corresponds to which file.
Adding labels in the interface would make it very fat, so I've added tooltips
over the effect buttons in the main panel.
-- Daniil
--
Please avoid sending me Word or PowerPoint attachments.
See
http://www.gnu.org/philosophy/no-word-attachments.htmlSupport open standards! Take a look at this nice presentation:
http://www.dwheeler.com/essays/open-standards-security.pdf[tooltips.patch]
Index: Makefile
===================================================================
--- Makefile (revision 16673)
+++ Makefile (working copy)
@@ -16,7 +16,7 @@
# ADD_DEF=
-CC=gcc
+CC=gcc
LD=gcc
INSTALL=install
PREFIX=/usr/local
@@ -37,10 +37,19 @@
limit.o limitpanel.o mute.o mixpanel.o mix.o freeverb.o reverbpanel.o \
outpanel.o config.o window.o follower.o linkage.o
-GCF = -DETCDIR=\\\"$(ETCDIR)\\\" `pkg-config --cflags gtk+-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
+GCF = -DETCDIR=\\\"$(ETCDIR)\\\" `pkg-config --cflags gtk+-2.0` `pkg-config --cflags glib-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
all:
- $(MAKE) target CFLAGS="-O2 -ffast-math -fomit-frame-pointer $(GCF) $(ADD_DEF)"
+ $(MAKE) target CFLAGS="-O3 -ffast-math -fomit-frame-pointer \
+ -ftree-vectorize \
+ -march=opteron -mtune=opteron -mmmx -msse -msse2 -m3dnow -mfpmath=sse \
+ -funsafe-math-optimizations \
+ -ftree-parallelize-loops=2 \
+ -fvect-cost-model \
+ -fdelete-null-pointer-checks \
+ -fvariable-expansion-in-unroller \
+ -maccumulate-outgoing-args \
+ -Wall $(GCF) $(ADD_DEF)"
debug:
$(MAKE) target CFLAGS="-g -Wall -W -Wno-unused-parameter -D__NO_MATH_INLINES $(GCF) $(ADD_DEF)"
@@ -76,7 +85,7 @@
target: $(OBJ) postfish-wisdomrc
./touch-version
- $(LD) $(OBJ) $(CFLAGS) -o postfish $(LIBS) `pkg-config --libs gtk+-2.0` -lpthread -lfftw3f -lm #/home/xiphmont/electric-fence-2.1.4/libefence.a
+ $(LD) $(OBJ) $(CFLAGS) -o postfish $(LIBS) `pkg-config --libs gtk+-2.0` -lpthread -lgomp -lfftw3f -lm #/home/xiphmont/electric-fence-2.1.4/libefence.a
install: target
$(INSTALL) -d -m 0755 $(BINDIR)
Index: mainpanel.c
===================================================================
--- mainpanel.c (revision 16673)
+++ mainpanel.c (working copy)
@@ -21,6 +21,9 @@
*
*/
+#include <glib/gstring.h>
+
+
#include "postfish.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
@@ -560,6 +563,9 @@
char buffer[80];
sprintf(buffer," %d ",j+1);
p->channel_wa[i][j]=wa[j]=gtk_toggle_button_new_with_label(buffer);
+ GString *tooltip = get_channel_label(j);
+ gtk_widget_set_tooltip_text(wa[j], tooltip->str);
+ g_string_free(tooltip, TRUE);
if(multi_create){
/* a panel button per channel, multiple accellerated labels */
Index: input.c
===================================================================
--- input.c (revision 16673)
+++ input.c (working copy)
@@ -24,6 +24,7 @@
#include "postfish.h"
#include "feedback.h"
#include "input.h"
+#include <glib.h>
static off_t Acursor=0;
static off_t Bcursor=-1;
@@ -925,6 +926,41 @@
return;
}
+/* Returns filename label (filename + L/R) for given input channel */
+GString* get_channel_label(int ch){
+ GString *result = g_string_new("");
+ int i;
+ int curr_ch=0;
+ /* iterate over input groups to find the channel */
+ for(i=0; i<groups; i++) {
+ group_entry *g = group_list+i;
+ int j;
+ /* input group may have 1 or two channels of audio */
+ for(j=0; j < g->ch; j++) {
+ if (curr_ch == ch) {
+ file_entry *fe = g->file_list;
+ if (g->ch == 1) { /* mono */
+ g_string_printf(result, "%s", fe->name);
+ } else { /* stereo */
+ g_string_printf(result, "%s %s", fe->name, (j == 0) ? "L" : "R");
+ }
+ /* input group may contain more than one file */
+ int k;
+ for (k = 1; k < g->files; k++) {
+ fe++;
+ if (g->ch == 1) { /* mono */
+ g_string_append_printf(result, "\n%s", fe->name);
+ } else { /* stereo */
+ g_string_append_printf(result, "\n%s %s", fe->name,
+ (j == 0) ? "L" : "R");
+ }
+ }
+ }
+ curr_ch++;
+ }
+ }
+ return result;
+}
Index: input.h
===================================================================
--- input.h (revision 16673)
+++ input.h (working copy)
@@ -21,6 +21,8 @@
*
*/
+#include <glib.h>
+
extern void input_Acursor_set(off_t c);
extern void input_Bcursor_set(off_t c);
extern off_t input_time_to_cursor(const char *t);
@@ -33,3 +35,4 @@
extern int pull_input_feedback(float *peak,float *rms,off_t *cursor);
extern void input_reset(void);
extern off_t input_time_seek_rel(float s);
+extern GString* get_channel_label(int ch);
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference--
Mailing list:
[hidden email]
To UNSUBSCRIBE, use the form at the bottom of this web page:
https://lists.sourceforge.net/lists/listinfo/audacity-users