This example uses DirectSound to play a WAV file or a PCM audio data in the AVI file. You can add "xxx.wav" in the debug parameter bar when you use, or enter WAVPLAY XXX.WAV in the command line. The audio data in the read file uses the VIDEIO for WINDOW AVI file interface, so the audio data in the PCM format in the AVI file can also be played in addition to the WAV file. In the source code, DSound.h encapsulated a class cDirectSound using DirectSound, because I didn't dare to say that I have mastered the principle of DirectSound, so I didn't discuss its usage, and I didn't write a comment in the code. I just wrote it. A class that is tested can basically play PCM audio normally. If you are needed, please download the source code here: http://www.nhvideo.net/codes/wavplay.rar
Welcome to the Peken Opinion.