|
||
The original code failed under later versions of Windows. This was because the way the WAVEHDR structure is used was changed: in earlier versions, the lpNext reserved member could be copied using CopyMemory, but in later versions it could not. (It would have been safer not to mess with this anyway as the Platform SDK clearly states it is reserved, but hindsight is a simple thing). The new version fixes this problem by only copying the non-reserved members of the structure. |
Streaming .WAV File PlayerPlay .WAV files of any length using the Multimedia API without problems Playing digital audio can be achieved at a number of different levels under windows. At the simplest level, there is the Multimedia Control Interface (MCI) control provided with VB. This is turn is a very thin wrapper around the MCI API provided with Win32, which offers about the same level of control for playing waves as the API PlaySound and sndPlaySound functions. At a deeper level, your application can take charge of reading chunks of audio from disk and streaming it directly to the sound card. The advantage of these methods is you get more control over how the audio is played, and you can play audio files of arbitrary length without using all your memory. The Physical Location of this Article has Moved/article.asp?id=3432
|
|
|