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
5cf62133
Commit
5cf62133
authored
Sep 24, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output: document the audio_output_plugin methods
parent
08352184
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
output_api.h
src/output_api.h
+44
-0
No files found.
src/output_api.h
View file @
5cf62133
...
...
@@ -31,25 +31,69 @@
struct
audio_output
;
/**
* A plugin which controls an audio output device.
*/
struct
audio_output_plugin
{
/**
* the plugin's name
*/
const
char
*
name
;
/**
* Test if this plugin can provide a default output, in case
* none has been configured. This method is optional.
*/
int
(
*
test_default_device
)(
void
);
/**
* Configure and initialize the device, but do not open it
* yet.
*
* @param ao an opaque pointer to the audio_output structure
* @param audio_format the configured audio format, or NULL if
* none is configured
* @param param the configuration section, or NULL if there is
* no configuration
* @return NULL on error, or an opaque pointer to the plugin's
* data
*/
void
*
(
*
init
)(
struct
audio_output
*
ao
,
const
struct
audio_format
*
audio_format
,
ConfigParam
*
param
);
/**
* Free resources allocated by this device.
*/
void
(
*
finish
)(
void
*
data
);
/**
* Really open the device.
* @param audio_format the audio format in which data is going
* to be delivered; may be modified by the plugin
*/
int
(
*
open
)(
void
*
data
,
struct
audio_format
*
audio_format
);
/**
* Play a chunk of audio data.
*/
int
(
*
play
)(
void
*
data
,
const
char
*
playChunk
,
size_t
size
);
/**
* Try to cancel data which may still be in the device's
* buffers.
*/
void
(
*
cancel
)(
void
*
data
);
/**
* Close the device.
*/
void
(
*
close
)(
void
*
data
);
/**
* Display metadata for the next chunk. Optional method,
* because not all devices can display metadata.
*/
void
(
*
send_tag
)(
void
*
data
,
const
struct
tag
*
tag
);
};
...
...
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