pcm/Export: convert to class, make members private
This commit is contained in:
parent
9aa43416b6
commit
c5a2cadccc
@ -31,33 +31,7 @@ template<typename T> struct ConstBuffer;
|
|||||||
* outside of MPD. It has a few more options to tweak the binary
|
* outside of MPD. It has a few more options to tweak the binary
|
||||||
* representation which are not supported by the pcm_convert library.
|
* representation which are not supported by the pcm_convert library.
|
||||||
*/
|
*/
|
||||||
struct PcmExport {
|
class 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;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This buffer is used to reorder channels.
|
* This buffer is used to reorder channels.
|
||||||
*
|
*
|
||||||
@ -136,6 +110,33 @@ struct PcmExport {
|
|||||||
*/
|
*/
|
||||||
uint8_t reverse_endian;
|
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.
|
* Open the object.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user