[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11695] branches/soc-2007-hcube/source/ blender/src: Removed commented codes.
Csaba Hruska
csaba.hruska at gmail.com
Sun Aug 19 12:50:05 CEST 2007
Revision: 11695
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11695
Author: hcube
Date: 2007-08-19 12:50:05 +0200 (Sun, 19 Aug 2007)
Log Message:
-----------
Removed commented codes.
Modified Paths:
--------------
branches/soc-2007-hcube/source/blender/src/buttons_scene.c
branches/soc-2007-hcube/source/blender/src/drawseq.c
branches/soc-2007-hcube/source/blender/src/drawsound.c
branches/soc-2007-hcube/source/blender/src/drawview.c
branches/soc-2007-hcube/source/blender/src/editipo.c
branches/soc-2007-hcube/source/blender/src/editscreen.c
branches/soc-2007-hcube/source/blender/src/editseq.c
branches/soc-2007-hcube/source/blender/src/header_time.c
branches/soc-2007-hcube/source/blender/src/headerbuttons.c
branches/soc-2007-hcube/source/blender/src/sequence.c
branches/soc-2007-hcube/source/blender/src/space.c
branches/soc-2007-hcube/source/blender/src/toets.c
branches/soc-2007-hcube/source/blender/src/usiblender.c
Modified: branches/soc-2007-hcube/source/blender/src/buttons_scene.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/buttons_scene.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/buttons_scene.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -203,7 +203,6 @@
if (sample && sound) {
BLI_strncpy(sound->name, sample->name, sizeof(sound->name));
// by hcube
- //sound_set_sample(sound, sample);
audio_sample_load(sample);
sound->sample = sample;
do_soundbuts(B_SOUND_REDRAW);
@@ -259,7 +258,6 @@
//free(sound->stream);
//sound->stream = 0;
// by hcube
- //audio_makestream(sound);
sound = (bSound *) sound->id.next;
}
waitcursor(0);
@@ -274,7 +272,7 @@
case B_SOUND_MIXDOWN:
// by hcube
- //audio_mixdown();
+ seqaudio_mixdown();
break;
default:
Modified: branches/soc-2007-hcube/source/blender/src/drawseq.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/drawseq.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/drawseq.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -301,9 +301,7 @@
unsigned char *stream;
// by hcube
- //audio_makestream(seq->sound);
- if(seq->sound==NULL || seq->sound->stream==NULL) return;
- //if(seq->sound==NULL) return;
+ if(seq->sound==NULL /*|| seq->sound->stream==NULL*/) return;
if (seq->flag & SEQ_MUTE) glColor3ub(0x70, 0x80, 0x80); else glColor3ub(0x70, 0xc0, 0xc0);
@@ -340,7 +338,6 @@
if (f > G.v2d->cur.xmin) {
/* if this is close to the last sample just exit */
// by hcube
- //if (offset_next >= sound->streamlen) break;
if (offset_next >= sound->sample->len) break;
wavesamplemin = 131070;
@@ -349,9 +346,10 @@
/*find with high and low of the waveform for this draw,
evaluate small samples to find this range */
while (offset < offset_next) {
- s = (signed short*)(stream+offset);
+ // by hcube, edit this to enable wave drawing
+ //s = (signed short*)(stream+offset);
- wavesample = s[0]*2 + s[1];
+ wavesample = (10*offset)&0xffff;//s[0]*2 + s[1];
if (wavesamplemin>wavesample)
wavesamplemin=wavesample;
if (wavesamplemax<wavesample)
Modified: branches/soc-2007-hcube/source/blender/src/drawsound.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/drawsound.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/drawsound.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -66,7 +66,7 @@
{
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 */
-
+ return;
sp+= offset*startsamp;
deltasp= offset*sampdx;
@@ -98,11 +98,15 @@
int samples, startsamp, endsamp;
short *sp, sampdx;
+ /*
+ Sample PCM data for visualization: 4000KHz, 4 bit
+ */
+
/* one sample is where in v2d space? (v2d space in frames!) */
- sampfac= ((float)G.scene->r.frs_sec)/(sample->rate);
+ sampfac= ((float)G.scene->r.frs_sec)/(4000.0);
/* how many samples? */
- samples= sample->len/(sample->channels*(sample->bits/8));
+ samples= sample->len;// /(sample->channels*(sample->bits/8));
/* total len in v2d space */
sampxlen= sampfac*samples;
@@ -125,7 +129,9 @@
if(sample->channels==2) {
cpack(0x905050);
+ // by hcube, edit here for wave drawing
sp= (short *)(sample->data);
+ //sp = audio_sound_getvisualpcmdata(samplestruct bSound *sound, short **data, int startFrame, int endFrame);
draw_wave(startsamp, endsamp, sampdx, 2, sp, sampfac, 85.0);
cpack(0x506890);
@@ -216,7 +222,7 @@
if (G.ssound->sound) {
// by hcube
audio_sample_load(G.ssound->sound->sample);
- //draw_sample(G.ssound->sound->sample);
+ draw_sample(G.ssound->sound->sample);
}
draw_cfra_sound(spacedata);
Modified: branches/soc-2007-hcube/source/blender/src/drawview.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/drawview.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/drawview.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -3237,8 +3237,6 @@
// by hcube
seqaudio_stop();
seqaudio_play();
- //audiostream_stop();
- //audiostream_start( CFRA );
}
else {
// by hcube
@@ -3273,7 +3271,6 @@
cfraont= CFRA;
oldsa= curarea;
// by hcube
- //audiostream_start( CFRA );
seqaudio_play();
if (curarea && curarea->spacetype == SPACE_SEQ) {
@@ -3322,7 +3319,6 @@
if(event==SPACEKEY);
else CFRA= cfraont;
// by hcube
- //audiostream_stop();
seqaudio_stop();
if(oldsa!=curarea) areawinset(oldsa->win);
Modified: branches/soc-2007-hcube/source/blender/src/editipo.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/editipo.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/editipo.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -1082,12 +1082,14 @@
}
}
else if(blocktype==ID_SO) {
-
- // if (G.buts && G.buts->mainb == BUTS_SOUND) {
- // bSound *sound = G.buts->lockpoin;
- // *from= (ID *)sound;
- // if(sound) *ipo= sound->ipo;
- // }
+ // by hcube - enable sound ipos
+ /*
+ if (G.buts && G.buts->mainb == BUTS_SOUND) {
+ bSound *sound = G.buts->lockpoin;
+ *from= (ID *)sound;
+ if(sound) *ipo= sound->ipo;
+ }
+ */
}
else if(blocktype==ID_FLUIDSIM) {
if(ob && ( ob->fluidsimFlag & OB_FLUIDSIM_ENABLE)) {
@@ -2951,7 +2953,8 @@
}
}
}
- else if(FALSE /* && G.buts->mainb==BUTS_SOUND */) {
+ //by hcube - enable sound ipos
+ else if( FALSE && G.buts->mainb==BUTS_SOUND ) {
if(G.ssound) {
id= G.buts->lockpoin;
if(id) {
Modified: branches/soc-2007-hcube/source/blender/src/editscreen.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/editscreen.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/editscreen.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -1082,14 +1082,12 @@
if(CFRA>=PEFRA) {
CFRA= PSFRA;
// by hcube
- //audiostream_stop();
- //audiostream_start( CFRA );
seqaudio_stop();
seqaudio_play();
}
else {
// by hcube
- int cfra = seqaudio_getframeposition();//audiostream_pos();
+ int cfra = seqaudio_getframeposition();
if(cfra <= CFRA) CFRA++;
else CFRA= cfra;
}
@@ -1377,7 +1375,6 @@
else if (event==LOAD_FILE) {
BIF_read_file(ext_load_str);
// by hcube
- //sound_initialize_sounds();
audio_sound_loadall();
}
else if ((event==ONLOAD_SCRIPT) && BPY_has_onload_script()) {
Modified: branches/soc-2007-hcube/source/blender/src/editseq.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/editseq.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/editseq.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -891,11 +891,9 @@
sound->id.us=1;
sound->flags |= SOUND_FLAGS_SEQUENCE;
// by hcube
- //audio_makestream(sound);
//totframe= (int) ( ((float)(sound->streamlen-1)/( (float)G.scene->audio.mixrate*4.0 ))* (float)G.scene->r.frs_sec);
totframe= (int) ( ((float)(sound->sample->len-1)/( (float)sound->sample->rate ))* (float)G.scene->r.frs_sec);
- //totframe = sound->sample->len;
/* make seq */
seq= alloc_sequence(((Editing *)G.scene->ed)->seqbasep, cfra, machine);
Modified: branches/soc-2007-hcube/source/blender/src/header_time.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/header_time.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/header_time.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -84,7 +84,6 @@
if(stime->redraws & TIME_WITH_SEQ_AUDIO)
seqaudio_play();
// by hcube
- //audiostream_start( CFRA );
break;
case B_TL_STOP:
@@ -92,7 +91,6 @@
if(stime->redraws & TIME_WITH_SEQ_AUDIO)
seqaudio_stop();
//by hcube
- //audiostream_stop();
allqueue(REDRAWALL, 0);
break;
Modified: branches/soc-2007-hcube/source/blender/src/headerbuttons.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/headerbuttons.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/headerbuttons.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -406,9 +406,6 @@
/* results in fully updated anim system */
static void do_update_for_newframe(int mute, int events)
{
- // by hcube
- //extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */
-
if(events) {
allqueue(REDRAWALL, 0);
}
@@ -418,7 +415,7 @@
// by hcube
if ( (CFRA>1) && (!mute) && (G.scene->audio.flag & AUDIO_SCRUB))
- seqaudio_setframeposition( CFRA );// audiostream_scrub( CFRA );
+ seqaudio_setframeposition( CFRA );// scrub
/* 3d window, preview */
BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT);
Modified: branches/soc-2007-hcube/source/blender/src/sequence.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/sequence.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/sequence.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -122,8 +122,9 @@
if(seq->anim) IMB_free_anim(seq->anim);
// by hcube
+ // FOR REMOVE:
//if(seq->hdaudio) sound_close_hdaudio(seq->hdaudio);
-
+
if (seq->type & SEQ_EFFECT) {
struct SeqEffectHandle sh = get_sequence_effect(seq);
Modified: branches/soc-2007-hcube/source/blender/src/space.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/space.c 2007-08-19 10:48:38 UTC (rev 11694)
+++ branches/soc-2007-hcube/source/blender/src/space.c 2007-08-19 10:50:05 UTC (rev 11695)
@@ -990,7 +990,6 @@
if(U.uiflag & USER_GLOBALUNDO) {
BKE_undo_step(1);
// by hcube
- //sound_initialize_sounds();
audio_sound_loadall();
}
}
@@ -1013,7 +1012,6 @@
if(U.uiflag & USER_GLOBALUNDO) {
BKE_undo_step(-1);
// by hcube
- //sound_initialize_sounds();
audio_sound_loadall();
}
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list