Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
26832b94
Commit
26832b94
authored
Feb 03, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/audio_output/alsa.c: Woody ALSA compilation fix.
parent
0b3d5865
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
configure.ac.in
configure.ac.in
+5
-0
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+21
-1
No files found.
configure.ac.in
View file @
26832b94
...
...
@@ -2143,6 +2143,11 @@ AC_ARG_ENABLE(alsa,
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test "x${have_alsa}" = "xtrue"
then
AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include <alsa/asoundlib.h>],
[void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
PLUGINS="${PLUGINS} alsa"
LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
else
...
...
modules/audio_output/alsa.c
View file @
26832b94
...
...
@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: alsa.c,v 1.2
0 2003/01/17 23:59:18
sam Exp $
* $Id: alsa.c,v 1.2
1 2003/02/03 00:39:42
sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
...
...
@@ -432,8 +432,13 @@ static int Open( vlc_object_t *p_this )
}
/* Set 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
)
#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
)
#endif
{
msg_Err
(
p_aout
,
"unable to set sample rate (%s)"
,
snd_strerror
(
i_snd_rc
)
);
...
...
@@ -441,8 +446,13 @@ static int Open( vlc_object_t *p_this )
}
/* Set buffer size. */
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_buffer_size_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
i_buffer_size
)
)
<
0
)
#else
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_buffer_size_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
i_buffer_size
)
)
<
0
)
#endif
{
msg_Err
(
p_aout
,
"unable to set buffer size (%s)"
,
snd_strerror
(
i_snd_rc
)
);
...
...
@@ -450,8 +460,13 @@ static int Open( vlc_object_t *p_this )
}
/* Set period size. */
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_period_size_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
&
i_period_size
,
NULL
)
)
<
0
)
#else
if
(
(
i_snd_rc
=
snd_pcm_hw_params_set_period_size_near
(
p_sys
->
p_snd_pcm
,
p_hw
,
i_period_size
,
NULL
)
)
<
0
)
#endif
{
msg_Err
(
p_aout
,
"unable to set period size (%s)"
,
snd_strerror
(
i_snd_rc
)
);
...
...
@@ -467,8 +482,13 @@ static int Open( vlc_object_t *p_this )
goto
error
;
}
#ifdef HAVE_ALSA_NEW_API
if
(
(
i_snd_rc
=
snd_pcm_hw_params_get_period_time
(
p_hw
,
&
p_sys
->
i_period_time
,
NULL
)
)
<
0
)
#else
if
(
(
p_sys
->
i_period_time
=
snd_pcm_hw_params_get_period_time
(
p_hw
,
NULL
)
)
<
0
)
#endif
{
msg_Err
(
p_aout
,
"unable to get period time (%s)"
,
snd_strerror
(
i_snd_rc
)
);
...
...
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