pcm/Export: rename CalcSourceSize() to CalcInputSize()

This commit is contained in:
Max Kellermann 2019-06-26 15:46:05 +02:00
parent f43cafbf7d
commit e69fd0300a
5 changed files with 5 additions and 5 deletions

View File

@ -884,7 +884,7 @@ AlsaOutput::Play(const void *chunk, size_t size)
size_t bytes_written = ring_buffer->push((const uint8_t *)e.data,
e.size);
if (bytes_written > 0)
return pcm_export->CalcSourceSize(bytes_written);
return pcm_export->CalcInputSize(bytes_written);
/* now that the ring_buffer is full, we can activate
the socket handlers to trigger the first

View File

@ -890,7 +890,7 @@ OSXOutput::Play(const void *chunk, size_t size)
return size;
size_t bytes_written = ring_buffer->push((const uint8_t *)e.data, e.size);
return pcm_export->CalcSourceSize(bytes_written);
return pcm_export->CalcInputSize(bytes_written);
}
#endif
return ring_buffer->push((const uint8_t *)chunk, size);

View File

@ -681,7 +681,7 @@ OssOutput::Play(const void *chunk, size_t size)
ret = fd.Write(chunk, size);
if (ret > 0) {
#ifdef AFMT_S24_PACKED
ret = pcm_export->CalcSourceSize(ret);
ret = pcm_export->CalcInputSize(ret);
#endif
return ret;
}

View File

@ -266,7 +266,7 @@ PcmExport::Export(ConstBuffer<void> data) noexcept
}
size_t
PcmExport::CalcSourceSize(size_t size) const noexcept
PcmExport::CalcInputSize(size_t size) const noexcept
{
if (pack24)
/* 32 bit to 24 bit conversion (4 to 3 bytes) */

View File

@ -205,7 +205,7 @@ public:
* pcm_export() source buffer.
*/
gcc_pure
size_t CalcSourceSize(size_t dest_size) const noexcept;
size_t CalcInputSize(size_t dest_size) const noexcept;
};
#endif