diff options
author | Max Kellermann <max@duempel.org> | 2013-08-03 21:00:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-03 21:37:56 +0200 |
commit | d1e7b4e38136f9342aad76c685a13adf0e69f869 (patch) | |
tree | 49643b937ddfe735511b566a71398da5a945d7aa /src/pcm/PcmExport.cxx | |
parent | 67f591a9ce60651da41afc499bd9a22e25314e35 (diff) | |
download | mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip |
audio_format: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/pcm/PcmExport.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx index 8840dc865..762411f59 100644 --- a/src/pcm/PcmExport.cxx +++ b/src/pcm/PcmExport.cxx @@ -27,21 +27,21 @@ extern "C" { } void -PcmExport::Open(enum sample_format sample_format, unsigned _channels, +PcmExport::Open(SampleFormat sample_format, unsigned _channels, bool _dsd_usb, bool _shift8, bool _pack, bool _reverse_endian) { assert(audio_valid_sample_format(sample_format)); assert(!_dsd_usb || audio_valid_channel_count(_channels)); channels = _channels; - dsd_usb = _dsd_usb && sample_format == SAMPLE_FORMAT_DSD; + dsd_usb = _dsd_usb && sample_format == SampleFormat::DSD; if (dsd_usb) /* after the conversion to DSD-over-USB, the DSD samples are stuffed inside fake 24 bit samples */ - sample_format = SAMPLE_FORMAT_S24_P32; + sample_format = SampleFormat::S24_P32; - shift8 = _shift8 && sample_format == SAMPLE_FORMAT_S24_P32; - pack24 = _pack && sample_format == SAMPLE_FORMAT_S24_P32; + shift8 = _shift8 && sample_format == SampleFormat::S24_P32; + pack24 = _pack && sample_format == SampleFormat::S24_P32; assert(!shift8 || !pack24); @@ -58,7 +58,7 @@ PcmExport::Open(enum sample_format sample_format, unsigned _channels, } size_t -PcmExport::GetFrameSize(const struct audio_format &audio_format) const +PcmExport::GetFrameSize(const AudioFormat &audio_format) const { if (pack24) /* packed 24 bit samples (3 bytes per sample) */ @@ -71,7 +71,7 @@ PcmExport::GetFrameSize(const struct audio_format &audio_format) const bytes per sample) */ return channels * 4; - return audio_format_frame_size(&audio_format); + return audio_format.GetFrameSize(); } const void * |