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
3120958a
Commit
3120958a
authored
Sep 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm: --disable-dsd also disables the dsd2pcm library
parent
052726ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
Makefile.am
Makefile.am
+6
-2
PcmConvert.cxx
src/pcm/PcmConvert.cxx
+4
-0
PcmConvert.hxx
src/pcm/PcmConvert.hxx
+7
-1
No files found.
Makefile.am
View file @
3120958a
...
...
@@ -464,8 +464,6 @@ libpcm_a_SOURCES = \
src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx
\
src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx
\
src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx
\
src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
\
src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx
\
src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx
\
src/pcm/Volume.cxx src/pcm/Volume.hxx
\
src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx
\
...
...
@@ -493,6 +491,12 @@ PCM_LIBS = \
$(SOXR_LIBS)
\
$(SAMPLERATE_LIBS)
if
ENABLE_DSD
libpcm_a_SOURCES
+=
\
src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx
\
src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
endif
if
HAVE_LIBSAMPLERATE
libpcm_a_SOURCES
+=
\
src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
...
...
src/pcm/PcmConvert.cxx
View file @
3120958a
...
...
@@ -109,7 +109,9 @@ PcmConvert::Close()
if
(
enable_resampler
)
resampler
.
Close
();
#ifdef ENABLE_DSD
dsd
.
Reset
();
#endif
#ifndef NDEBUG
src_format
.
Clear
();
...
...
@@ -120,6 +122,7 @@ PcmConvert::Close()
ConstBuffer
<
void
>
PcmConvert
::
Convert
(
ConstBuffer
<
void
>
buffer
,
Error
&
error
)
{
#ifdef ENABLE_DSD
if
(
src_format
.
format
==
SampleFormat
::
DSD
)
{
auto
s
=
ConstBuffer
<
uint8_t
>::
FromVoid
(
buffer
);
auto
d
=
dsd
.
ToFloat
(
src_format
.
channels
,
s
);
...
...
@@ -131,6 +134,7 @@ PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
buffer
=
d
.
ToVoid
();
}
#endif
if
(
enable_resampler
)
{
buffer
=
resampler
.
Resample
(
buffer
,
error
);
...
...
src/pcm/PcmConvert.hxx
View file @
3120958a
...
...
@@ -20,13 +20,17 @@
#ifndef PCM_CONVERT_HXX
#define PCM_CONVERT_HXX
#include "
PcmDsd.hxx
"
#include "
check.h
"
#include "PcmBuffer.hxx"
#include "FormatConverter.hxx"
#include "ChannelsConverter.hxx"
#include "GlueResampler.hxx"
#include "AudioFormat.hxx"
#ifdef ENABLE_DSD
#include "PcmDsd.hxx"
#endif
#include <stddef.h>
template
<
typename
T
>
struct
ConstBuffer
;
...
...
@@ -39,7 +43,9 @@ class Domain;
* conversions.
*/
class
PcmConvert
{
#ifdef ENABLE_DSD
PcmDsd
dsd
;
#endif
GluePcmResampler
resampler
;
PcmFormatConverter
format_converter
;
...
...
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