6 #include <QCoreApplication>
7 #include <QRecursiveMutex>
14 struct AVCodecContext;
37 void DeleteOutput(
void);
38 QString ReinitAudio(
void);
40 void SetAudioInfo(
const QString &main_device,
41 const QString &passthru_device,
43 int codec_profile = -1);
44 void SetAudioParams(
AudioFormat format,
int orig_channels,
int channels,
45 AVCodecID codec,
int samplerate,
bool passthru,
46 int codec_profile = -1);
47 void SetEffDsp(
int dsprate);
49 void CheckFormat(
void);
55 bool Pause(
bool pause);
57 void PauseAudioUntilBuffered(
void);
58 AVCodecID
GetCodec(
void)
const {
return m_state.m_codec; }
62 uint AdjustVolume(
int change);
63 uint SetVolume(
int newvolume);
65 void SetStretchFactor(
float factor);
66 bool IsUpmixing(
void);
67 bool EnableUpmix(
bool enable,
bool toggle =
false);
69 bool CanPassthrough(
int samplerate,
int channels, AVCodecID codec,
int profile);
70 bool CanDownmix(
void);
76 uint GetMaxChannels(
void);
77 int GetMaxHDRate(
void);
78 std::chrono::milliseconds GetAudioTime(
void);
81 uint32_t CanProcess(
void);
82 int DecodeAudio(AVCodecContext *ctx,
83 uint8_t *buffer,
int &data_size,
87 bool SetMuted(
bool mute);
92 void AddAudioData(
char *buffer,
int len, std::chrono::milliseconds timecode,
int frames);
93 bool NeedDecodingBeforePassthrough(
void);
94 std::chrono::milliseconds LengthLastData(
void);
95 bool GetBufferStatus(
uint &fill,
uint &total);
96 bool IsBufferAlmostFull(
void);
97 std::chrono::milliseconds GetAudioBufferedTime(
void);
105 void AddVisuals(
void);
106 void RemoveVisuals(
void);
107 void ResetVisuals(
void);
113 float m_stretchFactor {1.0F};
115 bool m_mutedOnCreation {
false};
118 bool m_noAudioIn {
false};
119 bool m_noAudioOut {
true};
120 bool m_controlsVolume {
true};
124 #endif // AUDIOPLAYER_H