Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a25f41cb
Commit
a25f41cb
authored
Jul 12, 2001
by
Renaud Dartus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix audio/video synchro bug with esd
* Should fix buggy sound due to 44100-48000 Hz conversions
parent
23b4e9ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
35 deletions
+24
-35
TODO
TODO
+2
-2
include/audio_output.h
include/audio_output.h
+2
-1
plugins/esd/aout_esd.c
plugins/esd/aout_esd.c
+10
-7
src/audio_output/aout_s16.c
src/audio_output/aout_s16.c
+1
-22
src/audio_output/aout_u8.c
src/audio_output/aout_u8.c
+9
-3
No files found.
TODO
View file @
a25f41cb
...
...
@@ -103,7 +103,7 @@ Urgency: Critical
Description: Fix AC3 decoder
The AC3 decoder still has a few quality issues; fix them, and try to add
MMX support to it as well.
Status:
Todo
Status:
Done 15 June 2001 (reno)
Task: 0x52
Difficulty: Guru
...
...
@@ -193,7 +193,7 @@ Urgency: Critical
Description: Fix audio synchro
With some audio plugins, the audio stream is late because of buffer
sizes. See what'
s
wrong
and
fix
it
.
Status
:
Todo
Status
:
Done
12
July
2001
(
reno
)
Task
:
0x47
Difficulty
:
Hard
...
...
include/audio_output.h
View file @
a25f41cb
...
...
@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.3
7 2001/05/30 17:03:11 sam
Exp $
* $Id: audio_output.h,v 1.3
8 2001/07/12 20:31:33 reno
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
...
...
@@ -171,6 +171,7 @@ typedef struct aout_thread_s
/* Rate and gain of the audio output sound (in Hz) */
long
l_rate
;
long
l_gain
;
int
i_latency
;
/* there might be some useful private structure, such as audio_buf_info
* for the OSS output */
...
...
plugins/esd/aout_esd.c
View file @
a25f41cb
...
...
@@ -2,7 +2,7 @@
* aout_esd.c : Esound functions library
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: aout_esd.c,v 1.1
3 2001/05/30 17:03:12 sam
Exp $
* $Id: aout_esd.c,v 1.1
4 2001/07/12 20:31:33 reno
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -134,7 +134,7 @@ static int aout_Open( aout_thread_t *p_aout )
/* Initialize some variables */
p_aout
->
i_format
=
AOUT_FORMAT_DEFAULT
;
p_aout
->
i_channels
=
1
+
main_GetIntVariable
(
AOUT_STEREO_VAR
,
AOUT_STEREO_DEFAULT
);
p_aout
->
l_rate
=
main_GetIntVariable
(
AOUT_RATE_VAR
,
AOUT_RATE_DEFAULT
);
p_aout
->
l_rate
=
esd_audio_rate
;
/* We use actual esd rate value, not AOUT_RATE_DEFAULT */
i_bits
=
ESD_BITS16
;
i_mode
=
ESD_STREAM
;
...
...
@@ -162,10 +162,6 @@ static int aout_Open( aout_thread_t *p_aout )
return
(
-
1
);
}
intf_ErrMsg
(
"aout error: you are using the Esound plugin. There is no way yet to get the
\n
"
" driver latency because esd_get_latency() hangs, so expect a one
\n
"
" second delay with sound. Type `esdctl off' to disable esd."
);
return
(
0
);
}
...
...
@@ -174,6 +170,13 @@ static int aout_Open( aout_thread_t *p_aout )
*****************************************************************************/
static
int
aout_SetFormat
(
aout_thread_t
*
p_aout
)
{
int
i_fd
;
i_fd
=
esd_open_sound
(
NULL
);
p_aout
->
i_latency
=
esd_get_latency
(
i_fd
);
intf_WarnMsg
(
2
,
"aout_esd_latency: %d"
,
p_aout
->
i_latency
);
return
(
0
);
}
...
...
@@ -194,7 +197,7 @@ static long aout_GetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
static
void
aout_Play
(
aout_thread_t
*
p_aout
,
byte_t
*
buffer
,
int
i_size
)
{
int
i_amount
;
if
(
p_aout
->
p_sys
->
esd_format
&
ESD_STEREO
)
{
if
(
p_aout
->
p_sys
->
esd_format
&
ESD_BITS16
)
...
...
src/audio_output/aout_s16.c
View file @
a25f41cb
...
...
@@ -87,37 +87,16 @@ void aout_S16StereoThread( aout_thread_t * p_aout )
}
l_bytes
=
p_aout
->
pf_getbufinfo
(
p_aout
,
l_buffer_limit
);
#if 0
fprintf(stderr,"l_bytes 1: %li\n",l_bytes);
fprintf(stderr," playing...\n");
#endif
/* sizeof(s16) << (p_aout->b_stereo) == 4 */
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)(
l_bytes
/
4
))
*
1000000
)
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)(
(
l_bytes
+
4
*
p_aout
->
i_latency
)
/
4
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
p_aout
->
pf_play
(
p_aout
,
(
byte_t
*
)
p_aout
->
buffer
,
l_buffer_limit
*
sizeof
(
s16
)
);
#if 0
fprintf( stderr,"l_bytes #: %li\n",
p_aout->pf_getbufinfo( p_aout, l_buffer_limit ) );
#endif
if
(
l_bytes
>
(
l_buffer_limit
*
sizeof
(
s16
))
)
{
msleep
(
p_aout
->
l_msleep
);
#if 0
fprintf(stderr," sleeping...\n");
msleep( p_aout->l_msleep / 2);
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
fprintf(stderr,"l_bytes *: %li\n",l_bytes);
msleep( p_aout->l_msleep / 2);
}
else
{
fprintf(stderr," not sleeping.\n");
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
fprintf(stderr,"l_bytes 2: %li\n\n",l_bytes);
#endif
}
}
...
...
src/audio_output/aout_u8.c
View file @
a25f41cb
...
...
@@ -2,7 +2,7 @@
* aout_u8.c: 8 bit unsigned audio output functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: aout_u8.c,v 1.
5 2001/05/15 16:19:42 sam
Exp $
* $Id: aout_u8.c,v 1.
6 2001/07/12 20:31:33 reno
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
...
...
@@ -82,7 +82,10 @@ void aout_U8MonoThread( aout_thread_t * p_aout )
}
l_bytes
=
p_aout
->
pf_getbufinfo
(
p_aout
,
l_buffer_limit
);
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)(
l_bytes
/
1
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
/* sizeof(u8) << (p_aout->b_stereo) == 1 */
/* sizeof(u8) << (p_aout->b_stereo) == 1 */
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)((
l_bytes
+
4
*
p_aout
->
i_latency
)
/
1
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
p_aout
->
pf_play
(
p_aout
,
(
byte_t
*
)
p_aout
->
buffer
,
l_buffer_limit
*
sizeof
(
u8
)
);
if
(
l_bytes
>
(
l_buffer_limit
*
sizeof
(
u8
)
*
2
)
)
/* There are 2 channels (left & right) */
{
...
...
@@ -133,7 +136,10 @@ void aout_U8StereoThread( aout_thread_t * p_aout )
p_aout
->
s32_buffer
[
l_buffer
]
=
0
;
}
l_bytes
=
p_aout
->
pf_getbufinfo
(
p_aout
,
l_buffer_limit
);
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)(
l_bytes
/
2
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
/* sizeof(u8) << (p_aout->b_stereo) == 2 */
/* sizeof(u8) << (p_aout->b_stereo) == 2 */
p_aout
->
date
=
mdate
()
+
((((
mtime_t
)((
l_bytes
+
4
*
p_aout
->
i_latency
)
/
2
))
*
1000000
)
/
((
mtime_t
)
p_aout
->
l_rate
));
p_aout
->
pf_play
(
p_aout
,
(
byte_t
*
)
p_aout
->
buffer
,
l_buffer_limit
*
sizeof
(
u8
)
);
if
(
l_bytes
>
(
l_buffer_limit
*
sizeof
(
u8
))
)
{
...
...
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