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
2f6ba22b
Commit
2f6ba22b
authored
May 30, 2004
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/audio_output/alsa.c: fixed an utterly nonsensial if-block. Should
have no functional impact.
parent
fdf8f67b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+12
-8
No files found.
modules/audio_output/alsa.c
View file @
2f6ba22b
...
...
@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id
: alsa.c,v 1.40 2004/02/20 19:21:23 gbazin Exp
$
* $Id$
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
...
...
@@ -274,6 +274,7 @@ static int Open( vlc_object_t *p_this )
snd_pcm_sw_params_t
*
p_sw
;
int
i_snd_rc
=
-
1
;
int
i_old_rate
;
/* Allocate structures */
p_aout
->
output
.
p_sys
=
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
...
...
@@ -491,18 +492,21 @@ static int Open( vlc_object_t *p_this )
}
/* Set rate. */
i_old_rate
=
p_aout
->
output
.
output
.
i_rate
;
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
p_aout
->
output
.
output
.
i_rate
,
NULL
)
)
<
0
)
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
p_aout
->
output
.
output
.
i_rate
,
NULL
);
#else
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
p_aout
->
output
.
output
.
i_rate
,
NULL
)
)
<
0
)
i_snd_rc
=
snd_pcm_hw_params_set_rate_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
p_aout
->
output
.
output
.
i_rate
,
NULL
);
#endif
if
(
i_snd_rc
<
0
||
p_aout
->
output
.
output
.
i_rate
!=
i_old_rate
)
{
msg_Warn
(
p_aout
,
"The rate %d Hz is not supported by your hardware. "
"Using %d Hz instead.
\n
"
,
p_aout
->
output
.
output
.
i_rate
,
i_snd_rc
);
p_aout
->
output
.
output
.
i_rate
=
i_snd_rc
;
"Using %d Hz instead.
\n
"
,
i_old_rate
,
p_aout
->
output
.
output
.
i_rate
);
}
/* Set buffer size. */
...
...
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