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
b39bc85e
Commit
b39bc85e
authored
6 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioFormat: add mask support to ToString()
parent
603ce87a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
AudioFormat.cxx
src/AudioFormat.cxx
+15
-4
No files found.
src/AudioFormat.cxx
View file @
b39bc85e
...
@@ -53,12 +53,23 @@ ToString(const AudioFormat af) noexcept
...
@@ -53,12 +53,23 @@ ToString(const AudioFormat af) noexcept
sample rate */
sample rate */
p
+=
sprintf
(
p
,
"dsd%u:"
,
af
.
sample_rate
*
8
/
44100
);
p
+=
sprintf
(
p
,
"dsd%u:"
,
af
.
sample_rate
*
8
/
44100
);
}
else
{
}
else
{
p
+=
sprintf
(
p
,
"%u:%s:"
,
const
char
*
sample_format
=
af
.
format
!=
SampleFormat
::
UNDEFINED
af
.
sample_rate
,
?
sample_format_to_string
(
af
.
format
)
sample_format_to_string
(
af
.
format
));
:
"*"
;
if
(
af
.
sample_rate
>
0
)
p
+=
sprintf
(
p
,
"%u:%s:"
,
af
.
sample_rate
,
sample_format
);
else
p
+=
sprintf
(
p
,
"*:%s:"
,
sample_format
);
}
}
p
+=
sprintf
(
p
,
"%u"
,
af
.
channels
);
if
(
af
.
channels
>
0
)
p
+=
sprintf
(
p
,
"%u"
,
af
.
channels
);
else
{
*
p
++
=
'*'
;
*
p
=
0
;
}
return
buffer
;
return
buffer
;
}
}
This diff is collapsed.
Click to expand it.
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