mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr
This commit is contained in:
parent
4e6f03a860
commit
6cf59b6ae9
58 changed files with 315 additions and 469 deletions
|
@ -54,9 +54,10 @@ bool WavLoaderPlugin::sniff()
|
|||
|
||||
RefPtr<Buffer> WavLoaderPlugin::get_more_samples(size_t max_bytes_to_read_from_input)
|
||||
{
|
||||
#if AWAVLOADER_DEBUG
|
||||
dbgln("Read {} bytes WAV with num_channels {} sample rate {}, bits per sample {}, sample format {}", max_bytes_to_read_from_input, m_num_channels, m_sample_rate, pcm_bits_per_sample(m_sample_format), sample_format_name(m_sample_format));
|
||||
#endif
|
||||
dbgln_if(AWAVLOADER_DEBUG, "Read {} bytes WAV with num_channels {} sample rate {}, "
|
||||
"bits per sample {}, sample format {}",
|
||||
max_bytes_to_read_from_input, m_num_channels,
|
||||
m_sample_rate, pcm_bits_per_sample(m_sample_format), sample_format_name(m_sample_format));
|
||||
size_t samples_to_read = static_cast<int>(max_bytes_to_read_from_input) / (m_num_channels * (pcm_bits_per_sample(m_sample_format) / 8));
|
||||
RefPtr<Buffer> buffer;
|
||||
if (m_file) {
|
||||
|
@ -215,9 +216,8 @@ bool WavLoaderPlugin::parse_header()
|
|||
}
|
||||
}
|
||||
|
||||
#if AWAVLOADER_DEBUG
|
||||
dbgln("WAV format {} at {}bit, {} channels, rate {}Hz ", sample_format_name(m_sample_format), pcm_bits_per_sample(m_sample_format), m_num_channels, m_sample_rate);
|
||||
#endif
|
||||
dbgln_if(AWAVLOADER_DEBUG, "WAV format {} at {} bit, {} channels, rate {}Hz ",
|
||||
sample_format_name(m_sample_format), pcm_bits_per_sample(m_sample_format), m_num_channels, m_sample_rate);
|
||||
|
||||
// Read chunks until we find DATA
|
||||
bool found_data = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue