aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmExport.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm/PcmExport.hxx')
-rw-r--r--src/pcm/PcmExport.hxx25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/pcm/PcmExport.hxx b/src/pcm/PcmExport.hxx
index bd18c0534..b99a35835 100644
--- a/src/pcm/PcmExport.hxx
+++ b/src/pcm/PcmExport.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@
#include "AudioFormat.hxx"
struct AudioFormat;
+template<typename T> struct ConstBuffer;
/**
* An object that handles export of PCM samples to some instance
@@ -34,11 +35,11 @@ struct AudioFormat;
struct PcmExport {
/**
* The buffer is used to convert DSD samples to the
- * DSD-over-USB format.
+ * DoP format.
*
- * @see #dsd_usb
+ * @see #dop
*/
- PcmBuffer dsd_buffer;
+ PcmBuffer dop_buffer;
/**
* The buffer is used to pack samples, removing padding.
@@ -60,11 +61,11 @@ struct PcmExport {
uint8_t channels;
/**
- * Convert DSD to DSD-over-USB? Input format must be
+ * Convert DSD to DSD-over-PCM (DoP)? Input format must be
* SampleFormat::DSD and output format must be
* SampleFormat::S24_P32.
*/
- bool dsd_usb;
+ bool dop;
/**
* Convert (padded) 24 bit samples to 32 bit by shifting 8
@@ -88,14 +89,14 @@ struct PcmExport {
* Open the #pcm_export_state object.
*
* There is no "close" method. This function may be called multiple
- * times to reuse the object, until pcm_export_deinit() is called.
+ * times to reuse the object.
*
* This function cannot fail.
*
- * @param channels the number of channels; ignored unless dsd_usb is set
+ * @param channels the number of channels; ignored unless dop is set
*/
void Open(SampleFormat sample_format, unsigned channels,
- bool dsd_usb, bool shift8, bool pack, bool reverse_endian);
+ bool dop, bool shift8, bool pack, bool reverse_endian);
/**
* Calculate the size of one output frame.
@@ -106,14 +107,10 @@ struct PcmExport {
/**
* Export a PCM buffer.
*
- * @param state an initialized and open pcm_export_state object
* @param src the source PCM buffer
- * @param src_size the size of #src in bytes
- * @param dest_size_r returns the number of bytes of the destination buffer
* @return the destination buffer (may be a pointer to the source buffer)
*/
- const void *Export(const void *src, size_t src_size,
- size_t &dest_size_r);
+ ConstBuffer<void> Export(ConstBuffer<void> src);
/**
* Converts the number of consumed bytes from the pcm_export()