Page MenuHome

lipsincpatch.txt

lipsincpatch.txt

? .sconsign.dblite
? .tm_project2.cache
? Update CVS
? lipsincpatch.txt
? patch.txt
? extern/ffmpeg/config.h
? extern/ffmpeg/config.log
? extern/ffmpeg/config.mak
? extern/ffmpeg/libavcodec-uninstalled.pc
? extern/ffmpeg/libavcodec.pc
? extern/ffmpeg/libavformat-uninstalled.pc
? extern/ffmpeg/libavformat.pc
? extern/ffmpeg/libavutil-uninstalled.pc
? extern/ffmpeg/libavutil.pc
? extern/ffmpeg/libpostproc-uninstalled.pc
? extern/ffmpeg/libpostproc.pc
? obj/linux-glibc2.4-i386
? tools/Blender.pyc
? tools/__init__.pyc
? tools/bcolors.pyc
? tools/btools.pyc
Index: source/blender/makesdna/DNA_sound_types.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_sound_types.h,v
retrieving revision 1.11
diff -u -r1.11 DNA_sound_types.h
--- source/blender/makesdna/DNA_sound_types.h 26 Nov 2006 12:23:21 -0000 1.11
+++ source/blender/makesdna/DNA_sound_types.h 26 Feb 2007 21:03:45 -0000
@@ -130,8 +130,11 @@
} bSoundListener;
/* spacesound->flag */
-#define SND_DRAWFRAMES 1
-#define SND_CFRA_NUM 2
+#define SND_DRAWFRAMES (1 << 0)
+#define SND_CFRA_NUM (1 << 1)
+#define SND_CHANNEL_LEFT (1 << 2)
+#define SND_CHANNEL_RIGHT (1 << 3)
+
typedef struct SpaceSound {
struct SpaceLink *next, *prev;
Index: source/blender/src/drawsound.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawsound.c,v
retrieving revision 1.18
diff -u -r1.18 drawsound.c
--- source/blender/src/drawsound.c 11 Feb 2007 04:02:17 -0000 1.18
+++ source/blender/src/drawsound.c 26 Feb 2007 21:03:50 -0000
@@ -62,7 +62,7 @@
void drawsoundspace(ScrArea *sa, void *spacedata);
/*implementation */
-static void draw_wave(int startsamp, int endsamp, short sampdx, short offset, short *sp, float sampfac, float y)
+static void draw_wave(int startsamp, int endsamp, short sampdx, short offset, short *sp, float sampfac, float y, float scafac)
{
float min, max, v1[2], v2[3];
int i, j, deltasp, value; /*deltasp, value: were both shorts but for music files 5min, zooming out cased a crash */
@@ -81,9 +81,10 @@
if(value < min) min= value;
else if(value > max) max= value;
}
- v1[1]= y + 0.002*min;
- v2[1]= y + 0.002*max;
+ v1[1]= y + scafac * min;
+ v2[1]= y + scafac * max;
+
v1[0]=v2[0]= sampfac*i;
glVertex2fv(v1);
@@ -122,22 +123,58 @@
G.v2d->tot.xmax= sampfac*samples;
/* channels? */
- if(sample->channels==2) {
-
- cpack(0x905050);
- sp= (short *)(sample->data);
- draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 85.0);
-
- cpack(0x506890);
- sp++;
- draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 190.0);
- }
- else {
- cpack(0x905050);
- sp= (short *)(sample->data);
+
+ if (G.ssound->flag & SND_CHANNEL_LEFT) {
+ if(sample->channels==2) {
+
+ cpack(0x905050);
+ sp= (short *)(sample->data);
+
+ draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 128.0, 0.004);
+ } else {
+
+ cpack(0x905050);
+ sp= (short *)(sample->data);
+
+ draw_wave(startsamp, endsamp, sampdx, 1, sp, sampfac, 128.0, 0.004);
+ }
+
+ } else if (G.ssound->flag & SND_CHANNEL_RIGHT) {
- draw_wave(startsamp, endsamp, sampdx, 1, sp, sampfac, 128.0);
+ if(sample->channels==2) {
+ cpack(0x506890);
+ sp= (short *)(sample->data);
+
+ sp++;
+ draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 128.0, 0.004);
+ } else {
+
+ cpack(0x506890);
+ sp= (short *)(sample->data);
+
+ draw_wave(startsamp, endsamp, sampdx, 1, sp, sampfac, 128.0, 0.004);
+ }
+
+ } else if (!(G.ssound->flag & SND_CHANNEL_RIGHT) && !(G.ssound->flag & SND_CHANNEL_LEFT)) {
+
+ if(sample->channels==2) {
+
+ cpack(0x905050);
+ sp= (short *)(sample->data);
+ draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 85.0, 0.002);
+
+ cpack(0x506890);
+ sp++;
+ draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 190.0, 0.002);
+ } else {
+
+ cpack(0x905050);
+ sp= (short *)(sample->data);
+
+ draw_wave(startsamp, endsamp, sampdx, 1, sp, sampfac, 128.0, 0.004);
+ }
}
+
}
static void draw_cfra_sound(SpaceSound *ssound)
Index: source/blender/src/header_sound.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/header_sound.c,v
retrieving revision 1.22
diff -u -r1.22 header_sound.c
--- source/blender/src/header_sound.c 30 Nov 2006 05:29:05 -0000 1.22
+++ source/blender/src/header_sound.c 26 Feb 2007 21:03:50 -0000
@@ -170,6 +170,68 @@
}
}
+static void do_sound_channelmenu(void *arg, int event)
+{
+ switch(event)
+ {
+ case 0:
+ if (!(G.ssound->flag & SND_CHANNEL_LEFT) && !(G.ssound->flag & SND_CHANNEL_RIGHT)) break;
+ if (G.ssound->flag & SND_CHANNEL_LEFT) {
+ G.ssound->flag -= SND_CHANNEL_LEFT;
+ } else {
+ G.ssound->flag -= SND_CHANNEL_RIGHT;
+ }
+
+ break;
+ case 1:
+ if (G.ssound->flag & SND_CHANNEL_LEFT) break;
+ if (G.ssound->flag & SND_CHANNEL_RIGHT) {
+ G.ssound->flag += SND_CHANNEL_LEFT;
+ G.ssound->flag -= SND_CHANNEL_RIGHT;
+ } else {
+ G.ssound->flag += SND_CHANNEL_LEFT;
+ }
+
+ break;
+ case 2:
+ if (G.ssound->flag & SND_CHANNEL_RIGHT) break;
+ if (G.ssound->flag & SND_CHANNEL_LEFT) {
+ G.ssound->flag -= SND_CHANNEL_LEFT;
+ G.ssound->flag += SND_CHANNEL_RIGHT;
+ } else {
+ G.ssound->flag += SND_CHANNEL_RIGHT;
+ }
+ break;
+ }
+
+ allqueue(REDRAWTIME, 0);
+ allqueue(REDRAWIPO, 0);
+ allqueue(REDRAWACTION, 0);
+ allqueue(REDRAWNLA, 0);
+ allqueue(REDRAWSOUND, 0);
+}
+
+static uiBlock *sound_channelmenu(void *arg_unused)
+{
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiNewBlock(&curarea->uiblocks, "sound_channelmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ uiBlockSetButmFunc(block, do_sound_channelmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Stereo", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Left", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Right", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 60);
+
+ return block;
+}
+
static void do_sound_viewmenu(void *arg, int event)
{
extern int play_anim(int mode);
@@ -193,6 +255,11 @@
case 6: /* jump to previous marker */
nextprev_marker(-1);
break;
+ case 7:
+ G.v2d->flag ^= V2D_VIEWLOCK;
+ if(G.v2d->flag & V2D_VIEWLOCK)
+ view2d_do_locks(curarea, 0);
+ break;
}
allqueue(REDRAWVIEW3D, 0);
}
@@ -221,7 +288,13 @@
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
-
+
+ uiDefIconTextBut(block, BUTM, 1, (G.v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
+ "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
+
+ uiDefIconTextBlockBut(block, sound_channelmenu,
+ NULL, ICON_RIGHTARROW_THIN, "View Channel", 0, yco-=20, 120, 20, "");
+
if (!curarea->full)
uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
else
@@ -304,6 +377,7 @@
return block;
}
+
void sound_buttons(void)

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
24/31/7ab9bbf6e47b9fc03ef28105367a

Event Timeline