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
c5a2cadc
Commit
c5a2cadc
authored
Jan 11, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Export: convert to class, make members private
parent
9aa43416
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
27 deletions
+28
-27
PcmExport.hxx
src/pcm/PcmExport.hxx
+28
-27
No files found.
src/pcm/PcmExport.hxx
View file @
c5a2cadc
...
...
@@ -31,33 +31,7 @@ template<typename T> struct ConstBuffer;
* outside of MPD. It has a few more options to tweak the binary
* representation which are not supported by the pcm_convert library.
*/
struct
PcmExport
{
struct
Params
{
bool
alsa_channel_order
=
false
;
#ifdef ENABLE_DSD
bool
dsd_u32
=
false
;
bool
dop
=
false
;
#endif
bool
shift8
=
false
;
bool
pack24
=
false
;
bool
reverse_endian
=
false
;
/**
* Calculate the output sample rate, given a specific input
* sample rate. Usually, both are the same; however, with
* DSD_U32, four input bytes (= 4 * 8 bits) are combined to
* one output word (32 bits), dividing the sample rate by 4.
*/
gcc_pure
unsigned
CalcOutputSampleRate
(
unsigned
input_sample_rate
)
const
;
/**
* The inverse of CalcOutputSampleRate().
*/
gcc_pure
unsigned
CalcInputSampleRate
(
unsigned
output_sample_rate
)
const
;
};
class
PcmExport
{
/**
* This buffer is used to reorder channels.
*
...
...
@@ -136,6 +110,33 @@ struct PcmExport {
*/
uint8_t
reverse_endian
;
public
:
struct
Params
{
bool
alsa_channel_order
=
false
;
#ifdef ENABLE_DSD
bool
dsd_u32
=
false
;
bool
dop
=
false
;
#endif
bool
shift8
=
false
;
bool
pack24
=
false
;
bool
reverse_endian
=
false
;
/**
* Calculate the output sample rate, given a specific input
* sample rate. Usually, both are the same; however, with
* DSD_U32, four input bytes (= 4 * 8 bits) are combined to
* one output word (32 bits), dividing the sample rate by 4.
*/
gcc_pure
unsigned
CalcOutputSampleRate
(
unsigned
input_sample_rate
)
const
;
/**
* The inverse of CalcOutputSampleRate().
*/
gcc_pure
unsigned
CalcInputSampleRate
(
unsigned
output_sample_rate
)
const
;
};
/**
* Open the object.
*
...
...
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