Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
6691d5b2
Commit
6691d5b2
authored
21 years ago
by
Cyril Deguet
Browse files
Options
Downloads
Patches
Plain Diff
* modules/audio_output/esd: forced sample rate to ESD_DEFAULT_RATE
At last closes bug
#625
!
parent
82aeb6d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/audio_output/esd.c
+16
-5
16 additions, 5 deletions
modules/audio_output/esd.c
with
16 additions
and
5 deletions
modules/audio_output/esd.c
+
16
−
5
View file @
6691d5b2
...
...
@@ -2,7 +2,7 @@
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: esd.c,v 1.1
8
2003/0
3/30 18:14:36 gbazin
Exp $
* $Id: esd.c,v 1.1
9
2003/0
6/25 21:17:21 asmax
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -34,6 +34,8 @@
#include
<vlc/aout.h>
#include
"aout_internal.h"
#include
<sys/socket.h>
#include
<esd.h>
/*****************************************************************************
...
...
@@ -75,6 +77,7 @@ static int Open( vlc_object_t *p_this )
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
;
int
i_nb_channels
;
int
fl
;
/* Allocate structure */
p_sys
=
malloc
(
sizeof
(
aout_sys_t
)
);
...
...
@@ -113,6 +116,9 @@ static int Open( vlc_object_t *p_this )
break
;
}
/* Force the rate, otherwise the sound is very noisy */
p_aout
->
output
.
output
.
i_rate
=
ESD_DEFAULT_RATE
;
/* open a socket for playing a stream
* and try to open /dev/dsp if there's no EsounD */
p_sys
->
i_fd
=
esd_play_stream_fallback
(
p_sys
->
esd_format
,
...
...
@@ -154,13 +160,18 @@ static void Play( aout_instance_t *p_aout )
if
(
p_buffer
!=
NULL
)
{
i_tmp
=
write
(
p_sys
->
i_fd
,
p_buffer
->
p_buffer
,
p_buffer
->
i_nb_bytes
);
int
pos
;
char
*
data
=
p_buffer
->
p_buffer
;
if
(
i_tmp
<
0
)
for
(
pos
=
0
;
pos
+
ESD_BUF_SIZE
<=
p_buffer
->
i_nb_bytes
;
pos
+=
ESD_BUF_SIZE
)
{
msg_Err
(
p_aout
,
"write failed (%s)"
,
strerror
(
errno
)
);
i_tmp
=
write
(
p_sys
->
i_fd
,
data
+
pos
,
ESD_BUF_SIZE
);
if
(
i_tmp
<
0
)
{
msg_Err
(
p_aout
,
"write failed (%s)"
,
strerror
(
errno
)
);
}
}
aout_BufferFree
(
p_buffer
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment