Lines Matching defs:TinyalsaSource
52 struct TinyalsaSource : public DevicePortSource { struct
53 TinyalsaSource(unsigned pcmCard, unsigned pcmDevice, in TinyalsaSource() argument
74 ~TinyalsaSource() { in ~TinyalsaSource()
79 Result getCapturePosition(uint64_t &frames, uint64_t &time) override { in getCapturePosition()
92 uint64_t getCaptureFramesLocked(const nsecs_t nowNs) const { in getCaptureFramesLocked()
96 uint64_t getAvailableFramesLocked(const nsecs_t nowNs) const { in getAvailableFramesLocked()
100 uint64_t getAvailableFramesNowLocked() const { in getAvailableFramesNowLocked()
104 size_t getWaitFramesNowLocked(const size_t requestedFrames) const { in getWaitFramesNowLocked()
110 size_t read(float volume, size_t bytesToRead, IWriter &writer) override { in read()
164 void producerThread() { in producerThread()
187 size_t doRead(void *dst, size_t sz) { in doRead()
198 static std::unique_ptr<TinyalsaSource> create(unsigned pcmCard, in create()
215 const nsecs_t mStartNs;
216 const unsigned mSampleRateHz;
217 const unsigned mFrameSize;
218 const unsigned mReadSizeFrames;
222 std::atomic<uint32_t> mFramesLost = 0;
223 RingBuffer mRingBuffer;
224 talsa::Mixer mMixer;
225 talsa::PcmPtr mPcm;
226 std::thread mProduceThread;
227 std::atomic<bool> mProduceThreadRunning = true;
228 mutable Mutex mFrameCountersMutex;