// 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 <alsa/asoundlib.h>
#include <stdint.h>
class ALSAInput {
public:
- typedef std::function<bool(const uint8_t *data, unsigned num_samples, bmusb::AudioFormat audio_format, int64_t frame_length, std::chrono::steady_clock::time_point ts)> audio_callback_t;
+ typedef std::function<bool(const uint8_t *data, unsigned num_samples, bmusb::AudioFormat audio_format, std::chrono::steady_clock::time_point ts)> 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();
private:
void capture_thread_func();
- int64_t frames_to_pts(uint64_t n) const;
enum class CaptureEndReason {
REQUESTED_QUIT,