mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-04 00:36:01 +00:00
Fix PulseAudio when manually specifying the audio device
This commit is contained in:
parent
86140eb192
commit
0698e8b43f
@ -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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user