6 #include <QCoreApplication>
7 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
10 #include <QRecursiveMutex>
18 struct AVCodecContext;
41 void DeleteOutput(
void);
42 QString ReinitAudio(
void);
44 void SetAudioInfo(
const QString &main_device,
45 const QString &passthru_device,
47 int codec_profile = -1);
48 void SetAudioParams(
AudioFormat format,
int orig_channels,
int channels,
49 AVCodecID codec,
int samplerate,
bool passthru,
50 int codec_profile = -1);
51 void SetEffDsp(
int dsprate);
53 void CheckFormat(
void);
59 bool Pause(
bool pause);
61 void PauseAudioUntilBuffered(
void);
62 AVCodecID
GetCodec(
void)
const {
return m_state.m_codec; }
66 uint AdjustVolume(
int change);
67 uint SetVolume(
int newvolume);
69 void SetStretchFactor(
float factor);
70 bool IsUpmixing(
void);
71 bool EnableUpmix(
bool enable,
bool toggle =
false);
73 bool CanPassthrough(
int samplerate,
int channels, AVCodecID codec,
int profile);
74 bool CanDownmix(
void);
80 uint GetMaxChannels(
void);
81 int GetMaxHDRate(
void);
82 std::chrono::milliseconds GetAudioTime(
void);
85 uint32_t CanProcess(
void);
86 int DecodeAudio(AVCodecContext *ctx,
87 uint8_t *buffer,
int &data_size,
91 bool SetMuted(
bool mute);
96 void AddAudioData(
char *buffer,
int len, std::chrono::milliseconds timecode,
int frames);
97 bool NeedDecodingBeforePassthrough(
void);
98 std::chrono::milliseconds LengthLastData(
void);
99 bool GetBufferStatus(
uint &fill,
uint &total);
100 bool IsBufferAlmostFull(
void);
101 std::chrono::milliseconds GetAudioBufferedTime(
void);
109 void AddVisuals(
void);
110 void RemoveVisuals(
void);
111 void ResetVisuals(
void);
117 float m_stretchFactor {1.0F};
118 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
119 QMutex m_lock {QMutex::Recursive};
123 bool m_mutedOnCreation {
false};
126 bool m_noAudioIn {
false};
127 bool m_noAudioOut {
true};
128 bool m_controlsVolume {
true};
132 #endif // AUDIOPLAYER_H