pcm/Format: change parameters/return values to ConstBuffer
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
template<typename T> struct ConstBuffer;
|
||||
class PcmBuffer;
|
||||
class PcmDither;
|
||||
|
||||
@@ -36,14 +37,12 @@ class PcmDither;
|
||||
* @param dither a pcm_dither object for 24-to-16 conversion
|
||||
* @param bits the number of in the source buffer
|
||||
* @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
|
||||
*/
|
||||
const int16_t *
|
||||
gcc_pure
|
||||
ConstBuffer<int16_t>
|
||||
pcm_convert_to_16(PcmBuffer &buffer, PcmDither &dither,
|
||||
SampleFormat src_format, const void *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
SampleFormat src_format, ConstBuffer<void> src);
|
||||
|
||||
/**
|
||||
* Converts PCM samples to 24 bit (32 bit alignment).
|
||||
@@ -51,14 +50,12 @@ pcm_convert_to_16(PcmBuffer &buffer, PcmDither &dither,
|
||||
* @param buffer a PcmBuffer object
|
||||
* @param bits the number of in the source buffer
|
||||
* @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
|
||||
*/
|
||||
const int32_t *
|
||||
gcc_pure
|
||||
ConstBuffer<int32_t>
|
||||
pcm_convert_to_24(PcmBuffer &buffer,
|
||||
SampleFormat src_format, const void *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
SampleFormat src_format, ConstBuffer<void> src);
|
||||
|
||||
/**
|
||||
* Converts PCM samples to 32 bit.
|
||||
@@ -66,14 +63,12 @@ pcm_convert_to_24(PcmBuffer &buffer,
|
||||
* @param buffer a PcmBuffer object
|
||||
* @param bits the number of in the source buffer
|
||||
* @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
|
||||
*/
|
||||
const int32_t *
|
||||
gcc_pure
|
||||
ConstBuffer<int32_t>
|
||||
pcm_convert_to_32(PcmBuffer &buffer,
|
||||
SampleFormat src_format, const void *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
SampleFormat src_format, ConstBuffer<void> src);
|
||||
|
||||
/**
|
||||
* Converts PCM samples to 32 bit floating point.
|
||||
@@ -85,9 +80,9 @@ pcm_convert_to_32(PcmBuffer &buffer,
|
||||
* @param dest_size_r returns the number of bytes of the destination buffer
|
||||
* @return the destination buffer
|
||||
*/
|
||||
const float *
|
||||
gcc_pure
|
||||
ConstBuffer<float>
|
||||
pcm_convert_to_float(PcmBuffer &buffer,
|
||||
SampleFormat src_format, const void *src,
|
||||
size_t src_size, size_t *dest_size_r);
|
||||
SampleFormat src_format, ConstBuffer<void> src);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user