~ubuntu-branches/ubuntu/trusty/libsdl2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/audio/pulseaudio/SDL_pulseaudio.c

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo
  • Date: 2013-12-28 12:31:19 UTC
  • mto: (7.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20131228123119-wehupm72qsjvh6vz
Tags: upstream-2.0.1+dfsg1
ImportĀ upstreamĀ versionĀ 2.0.1+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
#if (PA_API_VERSION < 12)
51
51
/** Return non-zero if the passed state is one of the connected states */
52
 
static __inline__ int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
 
52
static SDL_INLINE int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
53
53
    return
54
54
        x == PA_CONTEXT_CONNECTING ||
55
55
        x == PA_CONTEXT_AUTHORIZING ||
57
57
        x == PA_CONTEXT_READY;
58
58
}
59
59
/** Return non-zero if the passed state is one of the connected states */
60
 
static __inline__ int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
 
60
static SDL_INLINE int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
61
61
    return
62
62
        x == PA_STREAM_CREATING ||
63
63
        x == PA_STREAM_READY;
300
300
PULSEAUDIO_CloseDevice(_THIS)
301
301
{
302
302
    if (this->hidden != NULL) {
303
 
        if (this->hidden->mixbuf != NULL) {
304
 
            SDL_FreeAudioMem(this->hidden->mixbuf);
305
 
            this->hidden->mixbuf = NULL;
306
 
        }
 
303
        SDL_FreeAudioMem(this->hidden->mixbuf);
 
304
        this->hidden->mixbuf = NULL;
307
305
        if (this->hidden->stream) {
308
306
            PULSEAUDIO_pa_stream_disconnect(this->hidden->stream);
309
307
            PULSEAUDIO_pa_stream_unref(this->hidden->stream);
324
322
}
325
323
 
326
324
 
327
 
static __inline__ int
 
325
static SDL_INLINE int
328
326
squashVersion(const int major, const int minor, const int patch)
329
327
{
330
328
    return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);