Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
21a4aa0e
Commit
21a4aa0e
authored
Sep 27, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: fallback to another sample format where needed
This path should only be used when a non-plug device is forced.
parent
283d6e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+12
-2
No files found.
modules/audio_output/alsa.c
View file @
21a4aa0e
...
...
@@ -367,9 +367,19 @@ static int Open (vlc_object_t *obj)
/* Set sample format */
val
=
snd_pcm_hw_params_set_format
(
pcm
,
hw
,
pcm_format
);
if
(
val
<
0
)
if
(
val
==
0
)
;
else
if
(
pcm_format
!=
SND_PCM_FORMAT_FLOAT
&&
snd_pcm_hw_params_set_format
(
pcm
,
hw
,
SND_PCM_FORMAT_FLOAT
)
==
0
)
fourcc
=
VLC_CODEC_FL32
;
else
if
(
pcm_format
!=
SND_PCM_FORMAT_S32
&&
snd_pcm_hw_params_set_format
(
pcm
,
hw
,
SND_PCM_FORMAT_S32
)
==
0
)
fourcc
=
VLC_CODEC_S32N
;
else
if
(
pcm_format
!=
SND_PCM_FORMAT_S16
&&
snd_pcm_hw_params_set_format
(
pcm
,
hw
,
SND_PCM_FORMAT_S16
)
==
0
)
fourcc
=
VLC_CODEC_S16N
;
else
{
/* TODO: fallback to FL32 / S16N */
msg_Err
(
aout
,
"cannot set sample format: %s"
,
snd_strerror
(
val
));
goto
error
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment