Add sndio mixer plugin
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "../OutputAPI.hxx"
|
||||
#include "mixer/Listener.hxx"
|
||||
|
||||
#ifndef MPD_SNDIO_OUTPUT_PLUGIN_HXX
|
||||
#define MPD_SNDIO_OUTPUT_PLUGIN_HXX
|
||||
@@ -25,15 +26,23 @@
|
||||
extern const struct AudioOutputPlugin sndio_output_plugin;
|
||||
|
||||
class SndioOutput final : AudioOutput {
|
||||
Mixer *mixer = nullptr;
|
||||
MixerListener *listener = nullptr;
|
||||
const char *const device;
|
||||
const unsigned buffer_time; /* in ms */
|
||||
struct sio_hdl *sio_hdl;
|
||||
int raw_volume;
|
||||
|
||||
public:
|
||||
SndioOutput(const ConfigBlock &block);
|
||||
|
||||
static AudioOutput *Create(EventLoop &,
|
||||
const ConfigBlock &block);
|
||||
const ConfigBlock &block);
|
||||
|
||||
void SetVolume(unsigned int _volume);
|
||||
unsigned int GetVolume();
|
||||
void VolumeChanged(int _volume);
|
||||
void RegisterMixerListener(Mixer *_mixer, MixerListener *_listener);
|
||||
|
||||
private:
|
||||
void Open(AudioFormat &audio_format) override;
|
||||
|
||||
Reference in New Issue
Block a user