Any chance to access Movie Sound Channel?

Blitz3D Forums/Blitz3D Userlibs/Any chance to access Movie Sound Channel?

jfk EO-11110(Posted 2005) [#1]
I need to set the volume of multiple Movies individually. (well, actually 2 of them) to be able to crossfade them in realtime. Any Chance to set their volume? Through a Blitz Channel Handle or a Userlib call?


jfk EO-11110(Posted 2005) [#2]
ok, never mind, I just nailed it by adding a Setaudio Command to Sswifts fantastic mciSendString Userlib that allows to play Avis. It also allows to pause Avis, position on frames, play at variable speed rates etc.

I am not sure if Blitzes DirectShow is faster, but at least this is working for me. I will soon post this in the code archive. I think it's ok for Sswift since he released the Userlibs to the pubic some time ago.


jfk EO-11110(Posted 2005) [#3]
NO SO FAST, MOJO JOJO! :/

Arrg! It seems like using "setaudio AVIHANDLE volume to VOL" won't set the volume for an individual Movie, but for the entire "Wave" Mixer (not the "Video"-Sound Mixer). I still hope it's only a typo, but I already double-checked the handle etc.

Any help appreciated.

(BTW I was wrong hen I said it's a userlib: It's a direct winmm.dll call in the Blitz Code)

(BTW2: Now I chanched the Code so that is is using plain Userlibs. Still the same problem. Setaudio volume with the Handle of the Video alters the main Volume Channel, but don't affects the individual Video Sound Channels, as promised by MSDN, tho it IS possible to play two AVIs simultanoulsy with the Media Player with individual Sound Volume!)


jfk EO-11110(Posted 2005) [#4]
Man, this stuff stinks. after 48 hours of hacking I tend to give up the whole approach.

Even when I decide to work with no audio, there is still a problem that mciPlay lets me set the Blitz Window as the parent, but as soon as I draw some gfx (eg text) to the Blitz window while the movie is playing, the movie starts flickering wildy. I tried a lot of things, but it simply don't stops flickering. I also cannot access the pixels of the Movie, Copyrect doesn't work since the Movie is not drawn into the Blitz Window directly. I also tried mciUpdate to draw the Movie to Blitzes DC, but it didn't help.

there is the mciCapture Command that saves a frame as an image-file, but hey - that's dead slow.

additionally I have to say that playing two movies simultanously fails pretty much and both movies show only about 1 fps, at a very random framerate.

Maybe I totally failed to get something useful because I am a very bad Win32 Programmer.


Ross C(Posted 2005) [#5]
You tried putting a small delay in there somewhere?


jfk EO-11110(Posted 2005) [#6]
yes, I did, without success. Never mind, I completely gave up to realtime-play AVIs using mciSend. Now I just decided that for all and every super special FX that I am gonna do in Blitz over a Video Source, I'll work with series of images. Fast Movie Processor or VirtualDub and a lot more Apps can save all Frames of a movie clip easily. So why should I bother any longer.

Yesterday I was kind of pesimistic, but now I already feel a lot better.