X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Falsa_input.h;h=b9cfc83832359261ec790763a8abab8af44b9541;hb=a0e57ec99e9dfdd7e79bcf21e8c996dc43b6cb49;hp=060b9212690fce317f9dfac701af37d597af908a;hpb=392f9d1ccb835c05a3874c4bea163788b2c37024;p=nageru diff --git a/nageru/alsa_input.h b/nageru/alsa_input.h index 060b921..b9cfc83 100644 --- a/nageru/alsa_input.h +++ b/nageru/alsa_input.h @@ -5,14 +5,10 @@ // in callbacks. // // Note: “frame” here generally refers to the ALSA definition of frame, -// which is a set of samples, exactly one for each channel. The only exception -// is in frame_length, where it means the TIMEBASE length of the buffer -// as a whole, since that's what AudioMixer::add_audio() wants. +// which is a set of samples, exactly one for each channel. #include #include -#include -#include #include #include #include @@ -26,7 +22,7 @@ class ALSAPool; class ALSAInput { public: - typedef std::function audio_callback_t; + typedef std::function audio_callback_t; ALSAInput(const char *device, unsigned sample_rate, unsigned num_channels, audio_callback_t audio_callback, ALSAPool *parent_pool, unsigned internal_dev_index); ~ALSAInput(); @@ -50,8 +46,8 @@ public: static bool set_base_params(const char *device_name, snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hw_params, unsigned *sample_rate); private: + bool done_init = false; void capture_thread_func(); - int64_t frames_to_pts(uint64_t n) const; enum class CaptureEndReason { REQUESTED_QUIT,