src/audio/pulseaudio/SDL_pulseaudio.c
changeset 7860 2b0bcdea3a79
parent 7719 31b5f9ff36ca
child 8093 b43765095a6f
equal deleted inserted replaced
7859:af63b63e7aac 7860:2b0bcdea3a79
    47 #include "SDL_pulseaudio.h"
    47 #include "SDL_pulseaudio.h"
    48 #include "SDL_loadso.h"
    48 #include "SDL_loadso.h"
    49 
    49 
    50 #if (PA_API_VERSION < 12)
    50 #if (PA_API_VERSION < 12)
    51 /** Return non-zero if the passed state is one of the connected states */
    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     return
    53     return
    54         x == PA_CONTEXT_CONNECTING ||
    54         x == PA_CONTEXT_CONNECTING ||
    55         x == PA_CONTEXT_AUTHORIZING ||
    55         x == PA_CONTEXT_AUTHORIZING ||
    56         x == PA_CONTEXT_SETTING_NAME ||
    56         x == PA_CONTEXT_SETTING_NAME ||
    57         x == PA_CONTEXT_READY;
    57         x == PA_CONTEXT_READY;
    58 }
    58 }
    59 /** Return non-zero if the passed state is one of the connected states */
    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     return
    61     return
    62         x == PA_STREAM_CREATING ||
    62         x == PA_STREAM_CREATING ||
    63         x == PA_STREAM_READY;
    63         x == PA_STREAM_READY;
    64 }
    64 }
    65 #endif /* pulseaudio <= 0.9.10 */
    65 #endif /* pulseaudio <= 0.9.10 */
   320         this->hidden = NULL;
   320         this->hidden = NULL;
   321     }
   321     }
   322 }
   322 }
   323 
   323 
   324 
   324 
   325 static __inline__ int
   325 static SDL_INLINE int
   326 squashVersion(const int major, const int minor, const int patch)
   326 squashVersion(const int major, const int minor, const int patch)
   327 {
   327 {
   328     return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);
   328     return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);
   329 }
   329 }
   330 
   330