[fix] fix compile error on Macosx and Linux

This commit is contained in:
dijunkun
2024-08-02 13:56:22 +08:00
parent e4c05e1f4d
commit 3395004f93
6 changed files with 105 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
#include "speaker_capturer_linux.h"
SpeakerCapturerLinux::SpeakerCapturerLinux() {}
SpeakerCapturerLinux::~SpeakerCapturerLinux() {}
int SpeakerCapturerLinux::Init(speaker_data_cb cb) { return 0; }
int SpeakerCapturerLinux::Destroy() { return 0; }
int SpeakerCapturerLinux::Start() { return 0; }
int SpeakerCapturerLinux::Stop() { return 0; }
int SpeakerCapturerLinux::Pause() { return 0; }
int SpeakerCapturerLinux::Resume() { return 0; }

View File

@@ -0,0 +1,38 @@
/*
* @Author: DI JUNKUN
* @Date: 2024-08-02
* Copyright (c) 2024 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _SPEAKER_CAPTURER_LINUX_H_
#define _SPEAKER_CAPTURER_LINUX_H_
#include <thread>
#include <vector>
#include "speaker_capturer.h"
class SpeakerCapturerLinux : public SpeakerCapturer {
public:
SpeakerCapturerLinux();
~SpeakerCapturerLinux();
public:
virtual int Init(speaker_data_cb cb);
virtual int Destroy();
virtual int Start();
virtual int Stop();
int Pause();
int Resume();
private:
speaker_data_cb cb_ = nullptr;
private:
bool inited_ = false;
// thread
std::unique_ptr<std::thread> capture_thread_ = nullptr;
};
#endif