mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-16 13:30:35 +00:00
Default to corect audio device on Raspberry Pi
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of Moonlight Embedded.
|
||||
*
|
||||
* Copyright (C) 2015 Iwan Timmer
|
||||
* Copyright (C) 2015, 2016 Iwan Timmer
|
||||
*
|
||||
* Moonlight is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -62,6 +62,9 @@ static void alsa_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGU
|
||||
snd_pcm_uframes_t buffer_size = 12 * period_size;
|
||||
unsigned int sampleRate = opusConfig->sampleRate;
|
||||
|
||||
if (audio_device == NULL)
|
||||
audio_device = "sysdefault";
|
||||
|
||||
/* Open PCM device for playback. */
|
||||
CHECK_RETURN(snd_pcm_open(&handle, audio_device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of Moonlight Embedded.
|
||||
*
|
||||
* Copyright (C) 2015 Iwan Timmer
|
||||
* Copyright (C) 2015, 2016 Iwan Timmer
|
||||
*
|
||||
* Moonlight is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -131,6 +131,9 @@ static void omx_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGUR
|
||||
}
|
||||
OMX_CONFIG_BRCMAUDIODESTINATIONTYPE arDest;
|
||||
|
||||
if (audio_device == NULL)
|
||||
audio_device = "hdmi";
|
||||
|
||||
if (audio_device && strlen(audio_device) < sizeof(arDest.sName)) {
|
||||
memset(&arDest, 0, sizeof(OMX_CONFIG_BRCMAUDIODESTINATIONTYPE));
|
||||
arDest.nSize = sizeof(OMX_CONFIG_BRCMAUDIODESTINATIONTYPE);
|
||||
|
||||
Reference in New Issue
Block a user