Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update retroarch fix audio amlogic old #1260

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/audio/common/alsa.c b/audio/common/alsa.c
index f1b011a2e8..07a3d9b23b 100644
--- a/audio/common/alsa.c
+++ b/audio/common/alsa.c
@@ -63,16 +63,6 @@ int alsa_init_pcm(snd_pcm_t **pcm,
goto error;
}

- if ((errnum = snd_pcm_hw_params_any(*pcm, params)) < 0)
- {
- RARCH_ERR("[ALSA]: Failed to query hardware parameters from %s device \"%s\": %s\n",
- snd_pcm_stream_name(stream),
- snd_pcm_name(*pcm),
- snd_strerror(errnum));
-
- goto error;
- }
-
format = (snd_pcm_hw_params_test_format(*pcm, params, SND_PCM_FORMAT_FLOAT) == 0)
? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
stream_info->has_float = (format == SND_PCM_FORMAT_FLOAT);
@@ -83,6 +73,16 @@ int alsa_init_pcm(snd_pcm_t **pcm,
snd_pcm_name(*pcm)
);

+ if ((errnum = snd_pcm_hw_params_any(*pcm, params)) < 0)
+ {
+ RARCH_ERR("[ALSA]: Failed to query hardware parameters from %s device \"%s\": %s\n",
+ snd_pcm_stream_name(stream),
+ snd_pcm_name(*pcm),
+ snd_strerror(errnum));
+
+ goto error;
+ }
+
if ((errnum = snd_pcm_hw_params_set_access(*pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
{
RARCH_ERR("[ALSA]: Failed to set %s access for %s device \"%s\": %s\n",