Wiki Page Content

Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2009-11-17 18:38:17
Size: 755
Editor: SheenaSmith
Comment: create page, add content
Revision 6 as of 2013-07-14 07:07:59
Size: 1005
Editor: RainerDeyke
Comment: Added explanation of the relationship between SDL_LockAudio and SDL_LockAudioDevice.
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Use this function to unlock the callback function. Use this function to unlock the audio callback function.
Line 22: Line 22:
The lock manipulated by these functions protects the callback function. During a [[SDL_LockAudio]]()/[[SDL_UnlockAudio]]() pair, you can be guaranteed that the callback function is not running. The lock manipulated by these functions protects the callback function. During a [[SDL_LockAudio]]()/[[SDL_UnlockAudio]]() pair, you can be guaranteed that the callback function for the default audio device is not running. Use [[SDL_LockAudioDevice]]()/[[SDL_UnlockAudioDevice]]() if you need to lock a different audio device. [[SDL_UnlockAudio]]() is equivalent to [[SDL_UnlockAudioDevice]](1).
Line 27: Line 27:
 .[[SDL_LockAudio]]
Line 28: Line 29:
 .[[SDL_UnlockAudio]]
Line 30: Line 30:

----
[[CategoryAPI]], [[CategoryAudio]]

SDL_UnlockAudio

Use this function to unlock the audio callback function.

Syntax

void SDL_UnlockAudio(void)

Code Examples

You can add your code example here

Remarks

Unlocks a previous SDL_LockAudio() call.

The lock manipulated by these functions protects the callback function. During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that the callback function for the default audio device is not running. Use SDL_LockAudioDevice()/SDL_UnlockAudioDevice() if you need to lock a different audio device. SDL_UnlockAudio() is equivalent to SDL_UnlockAudioDevice(1).

Do not call these from the callback function or you will cause deadlock.


CategoryAPI, CategoryAudio

None: SDL_UnlockAudio (last edited 2015-01-09 23:02:23 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit