X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Falsa_input.h;h=22420b9134c970442e7112020425f519faf161dd;hb=f9024d141398e69e7b4011becd3ebbe37eaa1776;hp=060b9212690fce317f9dfac701af37d597af908a;hpb=9b7d691b4cc5db7dbfc18c82e86c1207fcac4722;p=nageru diff --git a/nageru/alsa_input.h b/nageru/alsa_input.h index 060b921..22420b9 100644 --- a/nageru/alsa_input.h +++ b/nageru/alsa_input.h @@ -5,9 +5,7 @@ // 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 @@ -26,7 +24,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 +48,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,