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
f77cd632
Commit
f77cd632
authored
Oct 04, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio_format: add constant MAX_CHANNELS
To be used in fixed-size arrays.
parent
2378c2d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
audio_format.h
src/audio_format.h
+3
-1
No files found.
src/audio_format.h
View file @
f77cd632
...
@@ -44,6 +44,8 @@ enum sample_format {
...
@@ -44,6 +44,8 @@ enum sample_format {
SAMPLE_FORMAT_S32
,
SAMPLE_FORMAT_S32
,
};
};
static
const
unsigned
MAX_CHANNELS
=
8
;
/**
/**
* This structure describes the format of a raw PCM stream.
* This structure describes the format of a raw PCM stream.
*/
*/
...
@@ -180,7 +182,7 @@ audio_valid_sample_format(enum sample_format format)
...
@@ -180,7 +182,7 @@ audio_valid_sample_format(enum sample_format format)
static
inline
bool
static
inline
bool
audio_valid_channel_count
(
unsigned
channels
)
audio_valid_channel_count
(
unsigned
channels
)
{
{
return
channels
>=
1
&&
channels
<=
8
;
return
channels
>=
1
&&
channels
<=
MAX_CHANNELS
;
}
}
/**
/**
...
...
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