Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
fcf29754
Commit
fcf29754
authored
Nov 08, 2005
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dirty hack to make devices using snd_intel8x0 drivers happy with 96k streams
parent
4d9b753a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
68 deletions
+88
-68
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+88
-68
No files found.
modules/audio_output/alsa.c
View file @
fcf29754
...
...
@@ -304,6 +304,7 @@ static int Open( vlc_object_t *p_this )
int
i_snd_rc
=
-
1
;
unsigned
int
i_old_rate
;
vlc_bool_t
b_retry
=
VLC_TRUE
;
/* Allocate structures */
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
...
...
@@ -493,6 +494,12 @@ static int Open( vlc_object_t *p_this )
snd_pcm_hw_params_alloca
(
&
p_hw
);
snd_pcm_sw_params_alloca
(
&
p_sw
);
/* Due to some bugs in alsa with some drivers, we need to retry in s16l
if snd_pcm_hw_params fails in fl32 */
while
(
b_retry
)
{
b_retry
=
VLC_FALSE
;
/* Get Initial hardware parameters */
if
(
(
i_snd_rc
=
snd_pcm_hw_params_any
(
p_sys
->
p_snd_pcm
,
p_hw
)
)
<
0
)
{
...
...
@@ -596,11 +603,24 @@ static int Open( vlc_object_t *p_this )
/* Commit hardware parameters. */
if
(
(
i_snd_rc
=
snd_pcm_hw_params
(
p_sys
->
p_snd_pcm
,
p_hw
)
)
<
0
)
{
if
(
b_retry
==
VLC_FALSE
&&
i_snd_pcm_format
==
SND_PCM_FORMAT_FLOAT
)
{
b_retry
=
VLC_TRUE
;
i_snd_pcm_format
=
SND_PCM_FORMAT_S16
;
p_aout
->
output
.
output
.
i_format
=
AOUT_FMT_S16_NE
;
msg_Warn
(
p_aout
,
"unable to commit hardware configuration "
"with fl32 samples. Retrying with s16l (%s)"
,
snd_strerror
(
i_snd_rc
)
);
}
else
{
msg_Err
(
p_aout
,
"unable to commit hardware configuration (%s)"
,
snd_strerror
(
i_snd_rc
)
);
goto
error
;
}
}
}
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_get_period_time
(
p_hw
,
...
...
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