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
e8787ac4
Commit
e8787ac4
authored
Feb 10, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio: added output enumeration functions
Added audio_output_get(), audio_output_find().
parent
3e870331
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
audio.c
src/audio.c
+22
-0
audio.h
src/audio.h
+13
-0
No files found.
src/audio.c
View file @
e8787ac4
...
...
@@ -45,6 +45,28 @@ unsigned int audio_output_count(void)
return
audioOutputArraySize
;
}
struct
audio_output
*
audio_output_get
(
unsigned
i
)
{
assert
(
i
<
audioOutputArraySize
);
return
&
audioOutputArray
[
i
];
}
struct
audio_output
*
audio_output_find
(
const
char
*
name
)
{
for
(
unsigned
i
=
0
;
i
<
audioOutputArraySize
;
++
i
)
{
struct
audio_output
*
ao
=
audio_output_get
(
i
);
if
(
strcmp
(
ao
->
name
,
name
)
==
0
)
return
ao
;
}
/* name not found */
return
NULL
;
}
static
unsigned
audio_output_config_count
(
void
)
{
...
...
src/audio.h
View file @
e8787ac4
...
...
@@ -35,6 +35,19 @@ struct config_param;
*/
unsigned
int
audio_output_count
(
void
);
/**
* Returns the "i"th audio output device.
*/
struct
audio_output
*
audio_output_get
(
unsigned
i
);
/**
* Returns the audio output device with the specified name. Returns
* NULL if the name does not exist.
*/
struct
audio_output
*
audio_output_find
(
const
char
*
name
);
void
getOutputAudioFormat
(
const
struct
audio_format
*
inFormat
,
struct
audio_format
*
outFormat
);
...
...
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