gvThink
Allows playback devices to play audio scheduled for playback.
- void gvThink( );
Routine | Required Header | Distribution |
---|---|---|
gvThink | <gv.h> | SDKZIP |
Remarks
gvPlayPacket only schedules a packet to be played in the future. The application must also call gvThink on a regular basis to ensure that the packets are actually played.
gvThink will check, for each device, how much space has become available for writing in the playback buffer (which may or may not be on the actual sound hardware). It will then check to see if the device has any sources that have audio which should be played during the time period that the newly available space represents. If so, the audio will be mixed into the playback buffer, and the audio will then be played when the playback position reaches that point in the buffer. If the playback device is stopped before that happens, then the audio will not be played, even if the device is then restarted.
gvThink should generally be called once for each run through the application’s main loop, or approximately every 10-30ms. If it is not called often enough, the playback position will reach a point in the playback buffer that GV has not yet had a chance to mix to, resulting in an audible skipping effect.
Section Reference: Gamespy Voice SDK
See Also: gvPlayPacket