return *this;
}
- S24( const S24& v ) { *this = v; }
S24( const double& d ) { *this = (int) d; }
S24( const float& f ) { *this = (int) f; }
S24( const signed short& s ) { *this = (int) s; }
double streamTime; // Number of elapsed seconds since the stream started.
#if defined(HAVE_GETTIMEOFDAY)
+ // The gettimeofday() when tickStreamTime was last called, or both
+ // fields at 0 if tickStreamTime has not been called since the last
+ // startStream().
struct timeval lastTickTimestamp;
#endif
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
+
+ static void sinkInfoCallback(pa_context* c, const pa_sink_info* info, int eol, void* arg);
+ static void contextStateCallback(pa_context* c, void* arg);
+ pa_threaded_mainloop* mainloop_;
+ int channels_;
};
#endif
#if defined(__LINUX_PULSE__)
+struct pa_context;
+struct pa_sink_info;
+struct pa_threaded_mainloop;
+
class RtApiPulse: public RtApi
{
public:
+ RtApiPulse() : mainloop_(0), channels_(2) {}
~RtApiPulse();
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; }
unsigned int getDeviceCount( void );