Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fdf1afc8
Commit
fdf1afc8
authored
Jul 14, 2006
by
J. Alexander Treuman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use audio_output { name } for the stream name in PulseAudio, but do it The Right Way
git-svn-id:
https://svn.musicpd.org/mpd/trunk@4342
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
b4945959
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
audioOutput_pulse.c
src/audioOutputs/audioOutput_pulse.c
+2
-7
No files found.
src/audioOutputs/audioOutput_pulse.c
View file @
fdf1afc8
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
typedef
struct
_PulseData
{
typedef
struct
_PulseData
{
char
*
server
;
char
*
server
;
char
*
sink
;
char
*
sink
;
char
*
name
;
pa_simple
*
s
;
pa_simple
*
s
;
}
PulseData
;
}
PulseData
;
...
@@ -44,7 +43,6 @@ static PulseData * newPulseData()
...
@@ -44,7 +43,6 @@ static PulseData * newPulseData()
ret
=
malloc
(
sizeof
(
PulseData
));
ret
=
malloc
(
sizeof
(
PulseData
));
ret
->
server
=
NULL
;
ret
->
server
=
NULL
;
ret
->
sink
=
NULL
;
ret
->
sink
=
NULL
;
ret
->
name
=
NULL
;
ret
->
s
=
NULL
;
ret
->
s
=
NULL
;
return
ret
;
return
ret
;
}
}
...
@@ -53,7 +51,6 @@ static void freePulseData(PulseData * ad)
...
@@ -53,7 +51,6 @@ static void freePulseData(PulseData * ad)
{
{
if
(
ad
->
server
)
free
(
ad
->
server
);
if
(
ad
->
server
)
free
(
ad
->
server
);
if
(
ad
->
sink
)
free
(
ad
->
sink
);
if
(
ad
->
sink
)
free
(
ad
->
sink
);
if
(
ad
->
name
)
free
(
ad
->
name
);
free
(
ad
);
free
(
ad
);
}
}
...
@@ -61,19 +58,16 @@ static int pulse_initDriver(AudioOutput * audioOutput, ConfigParam * param)
...
@@ -61,19 +58,16 @@ static int pulse_initDriver(AudioOutput * audioOutput, ConfigParam * param)
{
{
BlockParam
*
server
=
NULL
;
BlockParam
*
server
=
NULL
;
BlockParam
*
sink
=
NULL
;
BlockParam
*
sink
=
NULL
;
BlockParam
*
name
=
NULL
;
PulseData
*
ad
;
PulseData
*
ad
;
if
(
param
)
{
if
(
param
)
{
server
=
getBlockParam
(
param
,
"server"
);
server
=
getBlockParam
(
param
,
"server"
);
sink
=
getBlockParam
(
param
,
"sink"
);
sink
=
getBlockParam
(
param
,
"sink"
);
name
=
getBlockParam
(
param
,
"name"
);
}
}
ad
=
newPulseData
();
ad
=
newPulseData
();
ad
->
server
=
server
?
strdup
(
server
->
value
)
:
NULL
;
ad
->
server
=
server
?
strdup
(
server
->
value
)
:
NULL
;
ad
->
sink
=
sink
?
strdup
(
sink
->
value
)
:
NULL
;
ad
->
sink
=
sink
?
strdup
(
sink
->
value
)
:
NULL
;
ad
->
name
=
strdup
(
name
->
value
);
audioOutput
->
data
=
ad
;
audioOutput
->
data
=
ad
;
return
0
;
return
0
;
...
@@ -128,7 +122,8 @@ static int pulse_openDevice(AudioOutput * audioOutput)
...
@@ -128,7 +122,8 @@ static int pulse_openDevice(AudioOutput * audioOutput)
ss
.
channels
=
audioFormat
->
channels
;
ss
.
channels
=
audioFormat
->
channels
;
ad
->
s
=
pa_simple_new
(
ad
->
server
,
MPD_PULSE_NAME
,
PA_STREAM_PLAYBACK
,
ad
->
s
=
pa_simple_new
(
ad
->
server
,
MPD_PULSE_NAME
,
PA_STREAM_PLAYBACK
,
ad
->
sink
,
ad
->
name
,
&
ss
,
NULL
,
NULL
,
&
error
);
ad
->
sink
,
audioOutput
->
name
,
&
ss
,
NULL
,
NULL
,
&
error
);
if
(
!
ad
->
s
)
{
if
(
!
ad
->
s
)
{
ERROR
(
"Cannot connect to server in PulseAudio output "
\
ERROR
(
"Cannot connect to server in PulseAudio output "
\
"
\"
%s
\"
: %s
\n
"
,
audioOutput
->
name
,
pa_strerror
(
error
));
"
\"
%s
\"
: %s
\n
"
,
audioOutput
->
name
,
pa_strerror
(
error
));
...
...
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