Revision e784ba70
b/audio/sdlaudio.c | ||
---|---|---|
25 | 25 |
#include <SDL_thread.h> |
26 | 26 |
#include "vl.h" |
27 | 27 |
|
28 |
#ifndef _WIN32 |
|
29 |
#ifdef __sun__ |
|
30 |
#define _POSIX_PTHREAD_SEMANTICS 1 |
|
31 |
#endif |
|
32 |
#include <signal.h> |
|
33 |
#endif |
|
34 |
|
|
28 | 35 |
#define AUDIO_CAP "sdl" |
29 | 36 |
#include "audio_int.h" |
30 | 37 |
|
... | ... | |
177 | 184 |
static int sdl_open (SDL_AudioSpec *req, SDL_AudioSpec *obt) |
178 | 185 |
{ |
179 | 186 |
int status; |
187 |
#ifndef _WIN32 |
|
188 |
sigset_t new, old; |
|
189 |
|
|
190 |
/* Make sure potential threads created by SDL don't hog signals. */ |
|
191 |
sigfillset (&new); |
|
192 |
pthread_sigmask (SIG_BLOCK, &new, &old); |
|
193 |
#endif |
|
180 | 194 |
|
181 | 195 |
status = SDL_OpenAudio (req, obt); |
182 | 196 |
if (status) { |
183 | 197 |
sdl_logerr ("SDL_OpenAudio failed\n"); |
184 | 198 |
} |
199 |
|
|
200 |
#ifndef _WIN32 |
|
201 |
pthread_sigmask (SIG_SETMASK, &old, 0); |
|
202 |
#endif |
|
185 | 203 |
return status; |
186 | 204 |
} |
187 | 205 |
|
Also available in: Unified diff