Advertisement

How to play sound from AVI files?

Started by March 14, 2003 01:48 PM
-1 comments, last by paulbird 21 years, 11 months ago
I''ve been making a ''virtual'' tevlevision set with openGL to play compressed AVI files. I started with Jeff''s code and got it to play the files successfully. By the way, I found that a simple for/next loop to change RGB to BGR works just fine. I even got it to play actual live TV pictures with sound although not as smoothly. But I just can''t work out how to play sound from the AVI audio stream. In the Video for Windows help file it tells you how to grab a frame of video and play it but not the audio. It must surely be possible. Does anyone know how to do it? P.S. That tutorial is the first place I''ve come accross the createCompatibleDib function and have found it most useful. For example it lets you deal with the bit data directly which is much quicker than GetPixel/SetPixel etc. Using this I managed to make a ''Conways Life'' program run at incredible speed. MORE.. Finally, the tutorial uses win32 functions like HBITMAP etc. I like to write things in C++ using TBitmap and TMemoryDC etc. but it doesn''t seem like it can be done.

This topic is closed to new replies.

Advertisement