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
9a1fd919
Commit
9a1fd919
authored
Aug 19, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/audio_output/*: ported the ALSA, aRts, esd and OSS modules to
the latest aout3 changes.
parent
d068701b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
27 deletions
+32
-27
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+5
-6
modules/audio_output/arts.c
modules/audio_output/arts.c
+4
-4
modules/audio_output/esd.c
modules/audio_output/esd.c
+10
-6
modules/audio_output/file.c
modules/audio_output/file.c
+3
-3
modules/audio_output/oss.c
modules/audio_output/oss.c
+10
-8
No files found.
modules/audio_output/alsa.c
View file @
9a1fd919
...
...
@@ -2,7 +2,7 @@
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: alsa.c,v 1.
5 2002/08/19 21:31:11 massiot
Exp $
* $Id: alsa.c,v 1.
6 2002/08/19 23:07:30 sam
Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
...
...
@@ -88,8 +88,8 @@ static void ALSAFill ( aout_instance_t * );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
add_category_hint
(
N_
(
"A
udio
"
),
NULL
);
add_string
(
"alsa-device"
,
NULL
,
NULL
,
N_
(
"
N
ame"
),
NULL
);
add_category_hint
(
N_
(
"A
LSA
"
),
NULL
);
add_string
(
"alsa-device"
,
NULL
,
NULL
,
N_
(
"
device n
ame"
),
NULL
);
set_description
(
_
(
"ALSA audio module"
)
);
set_capability
(
"audio output"
,
50
);
set_callbacks
(
Open
,
Close
);
...
...
@@ -234,9 +234,8 @@ static int SetFormat( aout_instance_t * p_aout )
p_sys
->
b_can_sleek
=
VLC_TRUE
;
i_format
=
SND_PCM_FORMAT_S16_LE
;
i_channels
=
2
;
p_aout
->
output
.
output
.
i_bytes_per_sec
=
p_aout
->
output
.
output
.
i_rate
*
AOUT_SPDIF_SIZE
/
ALSA_SPDIF_PERIOD_SIZE
;
p_aout
->
output
.
output
.
i_bytes_per_frame
=
AOUT_SPDIF_SIZE
;
p_aout
->
output
.
output
.
i_frame_length
=
ALSA_SPDIF_PERIOD_SIZE
;
break
;
case
AOUT_FMT_FIXED32
:
default:
...
...
modules/audio_output/arts.c
View file @
9a1fd919
...
...
@@ -159,8 +159,9 @@ static int SetFormat( aout_instance_t *p_aout )
/*****************************************************************************
* Play: queue a buffer for playing by aRtsThread
*****************************************************************************/
static
void
Play
(
aout_instance_t
*
p_aout
)
;
static
void
Play
(
aout_instance_t
*
p_aout
)
{
;
}
/*****************************************************************************
...
...
@@ -213,9 +214,8 @@ static int aRtsThread( aout_instance_t * p_aout )
}
else
{
i_size
=
aout_FormatToByterate
(
&
p_aout
->
output
.
output
)
*
p_sys
->
i_size
/
p_aout
->
output
.
output
.
i_rate
;
i_size
=
p_sys
->
i_size
/
p_aout
->
output
.
output
.
i_frame_length
*
p_aout
->
output
.
output
.
i_bytes_per_frame
;
p_bytes
=
alloca
(
i_size
);
memset
(
p_bytes
,
0
,
i_size
);
}
...
...
modules/audio_output/esd.c
View file @
9a1fd919
...
...
@@ -2,7 +2,7 @@
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: esd.c,v 1.
7 2002/08/19 21:31:11 massiot
Exp $
* $Id: esd.c,v 1.
8 2002/08/19 23:07:30 sam
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -147,10 +147,14 @@ static int SetFormat( aout_instance_t *p_aout )
* number of buffered samples, so I assume ESD_BUF_SIZE/2 */
p_sys
->
latency
=
(
mtime_t
)(
esd_get_latency
(
esd_open_sound
(
NULL
)
)
+
ESD_BUF_SIZE
/
2
*
aout_FormatToByterate
(
&
p_aout
->
output
.
output
)
*
p_aout
->
output
.
output
.
i_bytes_per_frame
*
p_aout
->
output
.
output
.
i_rate
/
p_aout
->
output
.
output
.
i_frame_length
/
ESD_DEFAULT_RATE
)
*
(
mtime_t
)
1000000
/
(
mtime_t
)
aout_FormatToByterate
(
&
p_aout
->
output
.
output
);
/
p_aout
->
output
.
output
.
i_bytes_per_frame
/
p_aout
->
output
.
output
.
i_rate
*
p_aout
->
output
.
output
.
i_frame_length
;
p_sys
->
b_initialized
=
VLC_TRUE
;
...
...
@@ -209,9 +213,9 @@ static int ESDThread( aout_instance_t * p_aout )
}
else
{
i_size
=
aout_FormatToByterate
(
&
p_aout
->
output
.
output
)
*
ESD_BUF_SIZE
*
2
/
p_aout
->
output
.
output
.
i_rat
e
;
i_size
=
ESD_BUF_SIZE
*
2
/
p_aout
->
output
.
output
.
i_frame_length
*
p_aout
->
output
.
output
.
i_bytes_per_fram
e
;
p_bytes
=
alloca
(
i_size
);
memset
(
p_bytes
,
0
,
i_size
);
}
...
...
modules/audio_output/file.c
View file @
9a1fd919
...
...
@@ -2,7 +2,7 @@
* file.c : audio output which writes the samples to a file
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: file.c,v 1.
6 2002/08/19 21:31:11 massiot
Exp $
* $Id: file.c,v 1.
7 2002/08/19 23:07:30 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -47,7 +47,7 @@ static void Play ( aout_instance_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define FORMAT_TEXT N_("
O
utput format")
#define FORMAT_TEXT N_("
o
utput format")
#define FORMAT_LONGTEXT N_("one of \"u8\", \"s8\", \"u16\", \"s16\"," \
" \"u16_le\", \"s16_le\", \"u16_be\"," \
" \"s16_be\", \"fixed32\", \"float32\" or \"spdif\"")
...
...
@@ -60,7 +60,7 @@ static int format_int[] = { AOUT_FMT_U8, AOUT_FMT_S8, AOUT_FMT_U16_NE,
AOUT_FMT_U16_BE
,
AOUT_FMT_S16_BE
,
AOUT_FMT_FIXED32
,
AOUT_FMT_FLOAT32
,
AOUT_FMT_SPDIF
};
#define PATH_TEXT N_("
P
ath of the output file")
#define PATH_TEXT N_("
p
ath of the output file")
#define PATH_LONGTEXT N_("By default samples.raw")
vlc_module_begin
();
...
...
modules/audio_output/oss.c
View file @
9a1fd919
...
...
@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.1
1 2002/08/19 21:31:11 massiot
Exp $
* $Id: oss.c,v 1.1
2 2002/08/19 23:07:30 sam
Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -82,7 +82,7 @@ static int OSSThread ( aout_instance_t * );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
add_category_hint
(
N_
(
"
Audio
"
),
NULL
);
add_category_hint
(
N_
(
"
OSS
"
),
NULL
);
add_file
(
"dspdev"
,
"/dev/dsp"
,
NULL
,
N_
(
"OSS dsp device"
),
NULL
);
set_description
(
_
(
"Linux OSS /dev/dsp module"
)
);
set_capability
(
"audio output"
,
100
);
...
...
@@ -132,6 +132,7 @@ static int Open( vlc_object_t *p_this )
if
(
vlc_thread_create
(
p_aout
,
"aout"
,
OSSThread
,
VLC_FALSE
)
)
{
msg_Err
(
p_aout
,
"cannot create OSS thread (%s)"
,
strerror
(
errno
)
);
close
(
p_sys
->
i_fd
);
free
(
psz_device
);
free
(
p_sys
);
return
-
1
;
...
...
@@ -309,14 +310,16 @@ static int OSSThread( aout_instance_t * p_aout )
* Order is important here, since GetBufInfo is believed to take
* more time than mdate(). */
next_date
=
(
mtime_t
)
GetBufInfo
(
p_aout
)
*
1000000
/
aout_FormatToByterate
(
&
p_aout
->
output
.
output
);
/
p_aout
->
output
.
output
.
i_bytes_per_frame
/
p_aout
->
output
.
output
.
i_rate
*
p_aout
->
output
.
output
.
i_frame_length
;
next_date
+=
mdate
();
p_buffer
=
aout_OutputNextBuffer
(
p_aout
,
next_date
,
0
);
p_buffer
=
aout_OutputNextBuffer
(
p_aout
,
next_date
,
VLC_FALSE
);
}
else
{
p_buffer
=
aout_OutputNextBuffer
(
p_aout
,
0
,
1
);
p_buffer
=
aout_OutputNextBuffer
(
p_aout
,
0
,
VLC_TRUE
);
}
if
(
p_buffer
!=
NULL
)
...
...
@@ -326,9 +329,8 @@ static int OSSThread( aout_instance_t * p_aout )
}
else
{
i_size
=
aout_FormatToByterate
(
&
p_aout
->
output
.
output
)
*
FRAME_SIZE
/
p_aout
->
output
.
output
.
i_rate
;
i_size
=
FRAME_SIZE
/
p_aout
->
output
.
output
.
i_frame_length
*
p_aout
->
output
.
output
.
i_bytes_per_frame
;
p_bytes
=
alloca
(
i_size
);
memset
(
p_bytes
,
0
,
i_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