#pragma once #include /** * the audio Server. * Read and broadcast audio data. */ class Server { public: explicit Server(); ~Server(); /** * Indefinitely read and broadcast audio data. */ void loop(); /** * get the current rate of the audio data. * @return the current rate of the audio data. */ long getRate() const; /** * get the current number of channels of the audio data. * @return the current number of channels of the audio data. */ int getChannels() const; /** * get the current encoding of the audio data. * @return the current encoding of the audio data. */ int getEncoding() const; private: mpg123_handle* mpgHandle; long rate{}; int channels{}; int encoding{}; };