mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-25 10:48:24 +00:00
[client] audio: allow building without any audio support
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#if ENABLE_AUDIO
|
||||
|
||||
#include "audio.h"
|
||||
#include "main.h"
|
||||
#include "common/array.h"
|
||||
@@ -691,3 +693,5 @@ void audio_tick(unsigned long long tickCount)
|
||||
|
||||
app_invalidateGraphs();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#if ENABLE_AUDIO
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <purespice.h>
|
||||
|
||||
@@ -39,3 +41,11 @@ void audio_recordVolume(int channels, const uint16_t volume[]);
|
||||
void audio_recordMute(bool mute);
|
||||
|
||||
void audio_tick(unsigned long long tickCount);
|
||||
|
||||
#else
|
||||
|
||||
static inline void audio_init(void) {}
|
||||
static inline void audio_free(void) {}
|
||||
static inline void audio_tick(unsigned long long tickCount) {}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -870,6 +870,7 @@ int spiceThread(void * arg)
|
||||
.release = cb_spiceRelease,
|
||||
.request = cb_spiceRequest
|
||||
},
|
||||
#if ENABLE_AUDIO
|
||||
.playback =
|
||||
{
|
||||
.enable = audio_supportsPlayback(),
|
||||
@@ -887,6 +888,7 @@ int spiceThread(void * arg)
|
||||
.mute = audio_recordMute,
|
||||
.stop = audio_recordStop
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
if (!purespice_connect(&config))
|
||||
|
||||
Reference in New Issue
Block a user