mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 02:20:42 +00:00
Fix PulseAudio when manually specifying the audio device
This commit is contained in:
@@ -41,7 +41,7 @@ bool audio_pulse_init(char* audio_device) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int error;
|
int error;
|
||||||
dev = pa_simple_new(audio_device, "Moonlight Embedded", PA_STREAM_PLAYBACK, NULL, "Streaming", &spec, NULL, NULL, &error);
|
dev = pa_simple_new(NULL, "Moonlight Embedded", PA_STREAM_PLAYBACK, audio_device, "Streaming", &spec, NULL, NULL, &error);
|
||||||
|
|
||||||
if (dev)
|
if (dev)
|
||||||
pa_simple_free(dev);
|
pa_simple_free(dev);
|
||||||
@@ -80,7 +80,7 @@ static int pulse_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGU
|
|||||||
};
|
};
|
||||||
|
|
||||||
char* audio_device = (char*) context;
|
char* audio_device = (char*) context;
|
||||||
dev = pa_simple_new(audio_device, "Moonlight Embedded", PA_STREAM_PLAYBACK, NULL, "Streaming", &spec, NULL, NULL, &error);
|
dev = pa_simple_new(NULL, "Moonlight Embedded", PA_STREAM_PLAYBACK, audio_device, "Streaming", &spec, NULL, NULL, &error);
|
||||||
|
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
printf("Pulseaudio error: %s\n", pa_strerror(error));
|
printf("Pulseaudio error: %s\n", pa_strerror(error));
|
||||||
|
|||||||
Reference in New Issue
Block a user