Advertisement

Windows AVIFile: How to write interleaved Audio?

Started by April 04, 2000 10:50 AM
-1 comments, last by NightShade 24 years, 7 months ago
Here''s what I''m trying to do... I''m writing an AVI file using the AVIFile API. I want to insert WAV files. I basically have an array that is the sound data, and a WAVEFORMATEX structure corresponding to the data. The sounds that I insert might be anywhere in the file. There will probably be quite alot of silence between sounds. I see two ways to do this: 1) Somehow write each file into the AVI as a seperate stream, with a AVISTREAMINFO.dwStart member to offset it to the point that I want it to start playing. This doesn''t work. I get an AVIERR_UNSUPPORTED error if I try to offset the data. 2) (Preferred method) Each video frame, interleave a small amount of audio data (either silence if nothing is playing or part of the currently playing sound). Right now, all I can do is write one sound to the start of the avi file. Useful, but not so great. Unfortunatly Microsoft''s documentation for AviFile is extremely sketchy, even for them. No, actually it''s totally pathetic, horrible, and sickening, I refuse to candy coat bad documentation Anyway, anyone have any clues? Thanks a ton! -ns-
-ns-

This topic is closed to new replies.

Advertisement