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
9d79c72c
Commit
9d79c72c
authored
Aug 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: add API documentation
parent
a86aaef4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+17
-0
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
9d79c72c
...
...
@@ -237,6 +237,11 @@ alsa_test_default_device(void)
return
true
;
}
/**
* Convert MPD's #SampleFormat enum to libasound's snd_pcm_format_t
* enum. Returns SND_PCM_FORMAT_UNKNOWN if there is no according ALSA
* PCM format.
*/
static
snd_pcm_format_t
get_bitformat
(
SampleFormat
sample_format
)
{
...
...
@@ -271,6 +276,10 @@ get_bitformat(SampleFormat sample_format)
gcc_unreachable
();
}
/**
* Determine the byte-swapped PCM format. Returns
* SND_PCM_FORMAT_UNKNOWN if the format cannot be byte-swapped.
*/
static
snd_pcm_format_t
byteswap_bitformat
(
snd_pcm_format_t
fmt
)
{
...
...
@@ -292,6 +301,10 @@ byteswap_bitformat(snd_pcm_format_t fmt)
}
}
/**
* Check if there is a "packed" version of the give PCM format.
* Returns SND_PCM_FORMAT_UNKNOWN if not.
*/
static
snd_pcm_format_t
alsa_to_packed_format
(
snd_pcm_format_t
fmt
)
{
...
...
@@ -307,6 +320,10 @@ alsa_to_packed_format(snd_pcm_format_t fmt)
}
}
/**
* Attempts to configure the specified sample format. On failure,
* fall back to the packed version.
*/
static
int
alsa_try_format_or_packed
(
snd_pcm_t
*
pcm
,
snd_pcm_hw_params_t
*
hwparams
,
snd_pcm_format_t
fmt
,
bool
*
packed_r
)
...
...
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