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
be9e60d5
Commit
be9e60d5
authored
Nov 21, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio_format: added audio_format_valid()
parent
774417f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
audio_format.h
src/audio_format.h
+11
-0
No files found.
src/audio_format.h
View file @
be9e60d5
...
...
@@ -40,6 +40,17 @@ static inline bool audio_format_defined(const struct audio_format *af)
return
af
->
sample_rate
!=
0
;
}
/**
* Returns false if the format is not valid for playback with MPD.
* This function performs some basic validity checks.
*/
static
inline
bool
audio_format_valid
(
const
struct
audio_format
*
af
)
{
return
af
->
sample_rate
>
0
&&
(
af
->
bits
==
8
||
af
->
bits
==
16
||
af
->
bits
==
24
)
&&
af
->
channels
>=
1
;
}
static
inline
bool
audio_format_equals
(
const
struct
audio_format
*
a
,
const
struct
audio_format
*
b
)
{
...
...
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