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
dbbead6e
Commit
dbbead6e
authored
Nov 06, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/jack: renamed "output ports" to "destination ports"
Use the same name as in the libjack API documentation.
parent
8cb9f9b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
user.xml
doc/user.xml
+1
-1
jack_output_plugin.c
src/output/jack_output_plugin.c
+20
-18
No files found.
doc/user.xml
View file @
dbbead6e
...
...
@@ -762,7 +762,7 @@ cd mpd-version</programlisting>
<parameter>
A,B
</parameter>
</entry>
<entry>
The name
of the JACK source ports created by MPD
.
The name
s of the JACK destination ports to connect to
.
</entry>
</row>
<row>
...
...
src/output/jack_output_plugin.c
View file @
dbbead6e
...
...
@@ -51,7 +51,9 @@ struct jack_data {
const
char
*
name
;
/* configuration */
char
*
output_ports
[
2
];
char
*
destination_ports
[
2
];
size_t
ringbuffer_size
;
/* the current audio format */
...
...
@@ -247,13 +249,13 @@ mpd_jack_init(G_GNUC_UNUSED const struct audio_format *audio_format,
return
NULL
;
}
jd
->
output
_ports
[
0
]
=
ports
[
0
];
jd
->
output
_ports
[
1
]
=
ports
[
1
];
jd
->
destination
_ports
[
0
]
=
ports
[
0
];
jd
->
destination
_ports
[
1
]
=
ports
[
1
];
g_free
(
ports
);
}
else
{
jd
->
output
_ports
[
0
]
=
NULL
;
jd
->
output
_ports
[
1
]
=
NULL
;
jd
->
destination
_ports
[
0
]
=
NULL
;
jd
->
destination
_ports
[
1
]
=
NULL
;
}
jd
->
ringbuffer_size
=
...
...
@@ -273,8 +275,8 @@ mpd_jack_finish(void *data)
{
struct
jack_data
*
jd
=
data
;
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
jd
->
output
_ports
);
++
i
)
g_free
(
jd
->
output
_ports
[
i
]);
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
jd
->
destination
_ports
);
++
i
)
g_free
(
jd
->
destination
_ports
[
i
]);
g_free
(
jd
);
}
...
...
@@ -328,7 +330,7 @@ mpd_jack_stop(struct jack_data *jd)
static
bool
mpd_jack_start
(
struct
jack_data
*
jd
,
GError
**
error_r
)
{
const
char
*
output
_ports
[
2
],
**
jports
;
const
char
*
destination
_ports
[
2
],
**
jports
;
assert
(
jd
->
client
!=
NULL
);
...
...
@@ -353,7 +355,7 @@ mpd_jack_start(struct jack_data *jd, GError **error_r)
return
false
;
}
if
(
jd
->
output
_ports
[
1
]
==
NULL
)
{
if
(
jd
->
destination
_ports
[
1
]
==
NULL
)
{
/* no output ports were configured - ask libjack for
defaults */
jports
=
jack_get_ports
(
jd
->
client
,
NULL
,
NULL
,
...
...
@@ -365,15 +367,15 @@ mpd_jack_start(struct jack_data *jd, GError **error_r)
return
false
;
}
output
_ports
[
0
]
=
jports
[
0
];
output
_ports
[
1
]
=
jports
[
1
]
!=
NULL
?
jports
[
1
]
:
jports
[
0
];
destination
_ports
[
0
]
=
jports
[
0
];
destination
_ports
[
1
]
=
jports
[
1
]
!=
NULL
?
jports
[
1
]
:
jports
[
0
];
g_debug
(
"
output
_ports: %s %s"
,
jports
[
0
],
jports
[
1
]);
g_debug
(
"
destination
_ports: %s %s"
,
jports
[
0
],
jports
[
1
]);
}
else
{
/* use the configured output ports */
output_ports
[
0
]
=
jd
->
output
_ports
[
0
];
output_ports
[
1
]
=
jd
->
output
_ports
[
1
];
destination_ports
[
0
]
=
jd
->
destination
_ports
[
0
];
destination_ports
[
1
]
=
jd
->
destination
_ports
[
1
];
jports
=
NULL
;
}
...
...
@@ -382,11 +384,11 @@ mpd_jack_start(struct jack_data *jd, GError **error_r)
int
ret
;
ret
=
jack_connect
(
jd
->
client
,
jack_port_name
(
jd
->
ports
[
i
]),
output
_ports
[
i
]);
destination
_ports
[
i
]);
if
(
ret
!=
0
)
{
g_set_error
(
error_r
,
jack_output_quark
(),
0
,
"Not a valid JACK port: %s"
,
output
_ports
[
i
]);
destination
_ports
[
i
]);
if
(
jports
!=
NULL
)
free
(
jports
);
...
...
@@ -402,11 +404,11 @@ mpd_jack_start(struct jack_data *jd, GError **error_r)
int
ret
;
ret
=
jack_connect
(
jd
->
client
,
jack_port_name
(
jd
->
ports
[
0
]),
output
_ports
[
1
]);
destination
_ports
[
1
]);
if
(
ret
!=
0
)
{
g_set_error
(
error_r
,
jack_output_quark
(),
0
,
"Not a valid JACK port: %s"
,
output
_ports
[
1
]);
destination
_ports
[
1
]);
if
(
jports
!=
NULL
)
free
(
jports
);
...
...
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