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
b29a43b4
Commit
b29a43b4
authored
Jun 25, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/mad, ...: more libfmt logging
parent
f60a42e0
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
193 additions
and
199 deletions
+193
-199
LogInit.cxx
src/LogInit.cxx
+1
-1
Expire.cxx
src/client/Expire.cxx
+1
-1
Service.cxx
src/db/update/Service.cxx
+4
-6
Bridge.cxx
src/decoder/Bridge.cxx
+6
-5
Thread.cxx
src/decoder/Thread.cxx
+3
-3
AdPlugDecoderPlugin.cxx
src/decoder/plugins/AdPlugDecoderPlugin.cxx
+2
-2
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+2
-2
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+8
-8
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+1
-1
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+11
-11
PcmDecoderPlugin.cxx
src/decoder/plugins/PcmDecoderPlugin.cxx
+8
-8
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+13
-14
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+3
-3
TwolameEncoderPlugin.cxx
src/encoder/plugins/TwolameEncoderPlugin.cxx
+2
-2
meson.build
src/encoder/plugins/meson.build
+1
-0
ReplayGainFilterPlugin.cxx
src/filter/plugins/ReplayGainFilterPlugin.cxx
+3
-4
meson.build
src/filter/plugins/meson.build
+1
-0
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+12
-12
CurlInputPlugin.cxx
src/input/plugins/CurlInputPlugin.cxx
+3
-6
TidalInputPlugin.cxx
src/input/plugins/TidalInputPlugin.cxx
+2
-1
TidalSessionManager.cxx
src/input/plugins/TidalSessionManager.cxx
+1
-1
HwSetup.cxx
src/lib/alsa/HwSetup.cxx
+6
-6
meson.build
src/lib/alsa/meson.build
+1
-0
OssMixerPlugin.cxx
src/mixer/plugins/OssMixerPlugin.cxx
+3
-3
State.cxx
src/output/State.cxx
+2
-2
AoOutputPlugin.cxx
src/output/plugins/AoOutputPlugin.cxx
+1
-1
FifoOutputPlugin.cxx
src/output/plugins/FifoOutputPlugin.cxx
+2
-2
HaikuOutputPlugin.cxx
src/output/plugins/HaikuOutputPlugin.cxx
+19
-20
JackOutputPlugin.cxx
src/output/plugins/JackOutputPlugin.cxx
+8
-9
OSXOutputPlugin.cxx
src/output/plugins/OSXOutputPlugin.cxx
+19
-19
OssOutputPlugin.cxx
src/output/plugins/OssOutputPlugin.cxx
+6
-6
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+2
-2
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+2
-2
HttpdClient.cxx
src/output/plugins/httpd/HttpdClient.cxx
+9
-9
WasapiOutputPlugin.cxx
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+11
-13
LibsamplerateResampler.cxx
src/pcm/LibsamplerateResampler.cxx
+4
-4
SoxrResampler.cxx
src/pcm/SoxrResampler.cxx
+2
-3
meson.build
src/pcm/meson.build
+1
-0
CrossFade.cxx
src/player/CrossFade.cxx
+2
-2
Playlist.cxx
src/queue/Playlist.cxx
+2
-2
PlaylistControl.cxx
src/queue/PlaylistControl.cxx
+1
-1
Bonjour.cxx
src/zeroconf/Bonjour.cxx
+2
-2
No files found.
src/LogInit.cxx
View file @
b29a43b4
...
...
@@ -234,7 +234,7 @@ cycle_log_files() noexcept
if
(
out_path
.
IsNull
())
return
0
;
Format
Debug
(
log_domain
,
"Cycling log files"
);
Log
Debug
(
log_domain
,
"Cycling log files"
);
close_log_files
();
fd
=
open_log_file
();
...
...
src/client/Expire.cxx
View file @
b29a43b4
...
...
@@ -44,7 +44,7 @@ Client::OnTimeout() noexcept
assert
(
!
idle_waiting
);
assert
(
!
background_command
);
F
ormatDebug
(
client_domain
,
"[%u
] timeout"
,
num
);
F
mtDebug
(
client_domain
,
"[{}
] timeout"
,
num
);
}
Close
();
...
...
src/db/update/Service.cxx
View file @
b29a43b4
...
...
@@ -113,8 +113,7 @@ UpdateService::Task() noexcept
SetThreadName
(
"update"
);
if
(
!
next
.
path_utf8
.
empty
())
FormatDebug
(
update_domain
,
"starting: %s"
,
next
.
path_utf8
.
c_str
());
FmtDebug
(
update_domain
,
"starting: {}"
,
next
.
path_utf8
);
else
LogDebug
(
update_domain
,
"starting"
);
...
...
@@ -133,8 +132,7 @@ UpdateService::Task() noexcept
}
if
(
!
next
.
path_utf8
.
empty
())
FormatDebug
(
update_domain
,
"finished: %s"
,
next
.
path_utf8
.
c_str
());
FmtDebug
(
update_domain
,
"finished: {}"
,
next
.
path_utf8
);
else
LogDebug
(
update_domain
,
"finished"
);
...
...
@@ -155,8 +153,8 @@ UpdateService::StartThread(UpdateQueueItem &&i)
update_thread
.
Start
();
F
orma
tDebug
(
update_domain
,
"spawned thread for update job id %i
"
,
next
.
id
);
F
m
tDebug
(
update_domain
,
"spawned thread for update job id {}
"
,
next
.
id
);
}
unsigned
...
...
src/decoder/Bridge.cxx
View file @
b29a43b4
...
...
@@ -21,6 +21,7 @@
#include "DecoderAPI.hxx"
#include "Domain.hxx"
#include "Control.hxx"
#include "lib/fmt/AudioFormatFormatter.hxx"
#include "song/DetachedSong.hxx"
#include "pcm/Convert.hxx"
#include "MusicPipe.hxx"
...
...
@@ -268,9 +269,9 @@ DecoderBridge::Ready(const AudioFormat audio_format,
assert
(
decoder_tag
==
nullptr
);
assert
(
!
seeking
);
F
ormatDebug
(
decoder_domain
,
"audio_format=%s, seekable=%s
"
,
ToString
(
audio_format
).
c_str
()
,
seekable
?
"true"
:
"false"
);
F
mtDebug
(
decoder_domain
,
"audio_format={}, seekable={}
"
,
audio_format
,
seekable
);
{
const
std
::
lock_guard
<
Mutex
>
protect
(
dc
.
mutex
);
...
...
@@ -278,8 +279,8 @@ DecoderBridge::Ready(const AudioFormat audio_format,
}
if
(
dc
.
in_audio_format
!=
dc
.
out_audio_format
)
{
F
orma
tDebug
(
decoder_domain
,
"converting to %s"
,
ToString
(
dc
.
out_audio_format
).
c_str
()
);
F
m
tDebug
(
decoder_domain
,
"converting to %s"
,
dc
.
out_audio_format
);
try
{
convert
=
std
::
make_unique
<
PcmConvert
>
(
dc
.
in_audio_format
,
...
...
src/decoder/Thread.cxx
View file @
b29a43b4
...
...
@@ -61,7 +61,7 @@ DecoderUriDecode(const DecoderPlugin &plugin,
assert
(
uri
!=
nullptr
);
assert
(
bridge
.
dc
.
state
==
DecoderState
::
START
);
F
ormatDebug
(
decoder_thread_domain
,
"probing plugin %s
"
,
plugin
.
name
);
F
mtDebug
(
decoder_thread_domain
,
"probing plugin {}
"
,
plugin
.
name
);
if
(
bridge
.
dc
.
command
==
DecoderCommand
::
STOP
)
throw
StopDecoder
();
...
...
@@ -99,7 +99,7 @@ decoder_stream_decode(const DecoderPlugin &plugin,
assert
(
input_stream
.
IsReady
());
assert
(
bridge
.
dc
.
state
==
DecoderState
::
START
);
F
ormatDebug
(
decoder_thread_domain
,
"probing plugin %s
"
,
plugin
.
name
);
F
mtDebug
(
decoder_thread_domain
,
"probing plugin {}
"
,
plugin
.
name
);
if
(
bridge
.
dc
.
command
==
DecoderCommand
::
STOP
)
throw
StopDecoder
();
...
...
@@ -142,7 +142,7 @@ decoder_file_decode(const DecoderPlugin &plugin,
assert
(
path
.
IsAbsolute
());
assert
(
bridge
.
dc
.
state
==
DecoderState
::
START
);
F
ormatDebug
(
decoder_thread_domain
,
"probing plugin %s
"
,
plugin
.
name
);
F
mtDebug
(
decoder_thread_domain
,
"probing plugin {}
"
,
plugin
.
name
);
if
(
bridge
.
dc
.
command
==
DecoderCommand
::
STOP
)
throw
StopDecoder
();
...
...
src/decoder/plugins/AdPlugDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -38,8 +38,8 @@ static unsigned sample_rate;
static
bool
adplug_init
(
const
ConfigBlock
&
block
)
{
F
ormatDebug
(
adplug_domain
,
"adplug %s
"
,
CAdPlug
::
get_version
().
c_str
());
F
mtDebug
(
adplug_domain
,
"adplug {}
"
,
CAdPlug
::
get_version
());
sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
48000U
);
CheckSampleRate
(
sample_rate
);
...
...
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -168,8 +168,8 @@ audiofile_setup_sample_format(AFfilehandle af_fp) noexcept
afGetSampleFormat
(
af_fp
,
AF_DEFAULT_TRACK
,
&
fs
,
&
bits
);
if
(
!
audio_valid_sample_format
(
audiofile_bits_to_sample_format
(
bits
)))
{
F
orma
tDebug
(
audiofile_domain
,
"input file has
%d
bit samples, converting to 16"
,
F
m
tDebug
(
audiofile_domain
,
"input file has
{}
bit samples, converting to 16"
,
bits
);
bits
=
16
;
}
...
...
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -73,8 +73,8 @@ flac_scan_file(Path path_fs, TagHandler &handler)
{
FlacMetadataChain
chain
;
if
(
!
chain
.
Read
(
NarrowPath
(
path_fs
)))
{
F
orma
tDebug
(
flac_domain
,
"Failed to read FLAC tags: %s
"
,
F
m
tDebug
(
flac_domain
,
"Failed to read FLAC tags: {}
"
,
chain
.
GetStatusString
());
return
false
;
}
...
...
@@ -88,8 +88,8 @@ flac_scan_stream(InputStream &is, TagHandler &handler)
{
FlacMetadataChain
chain
;
if
(
!
chain
.
Read
(
is
))
{
F
orma
tDebug
(
flac_domain
,
"Failed to read FLAC tags: %s
"
,
F
m
tDebug
(
flac_domain
,
"Failed to read FLAC tags: {}
"
,
chain
.
GetStatusString
());
return
false
;
}
...
...
@@ -317,8 +317,8 @@ oggflac_scan_file(Path path_fs, TagHandler &handler)
{
FlacMetadataChain
chain
;
if
(
!
chain
.
ReadOgg
(
NarrowPath
(
path_fs
)))
{
F
orma
tDebug
(
flac_domain
,
"Failed to read OggFLAC tags: %s
"
,
F
m
tDebug
(
flac_domain
,
"Failed to read OggFLAC tags: {}
"
,
chain
.
GetStatusString
());
return
false
;
}
...
...
@@ -332,8 +332,8 @@ oggflac_scan_stream(InputStream &is, TagHandler &handler)
{
FlacMetadataChain
chain
;
if
(
!
chain
.
ReadOgg
(
is
))
{
F
orma
tDebug
(
flac_domain
,
"Failed to read OggFLAC tags: %s
"
,
F
m
tDebug
(
flac_domain
,
"Failed to read OggFLAC tags: {}
"
,
chain
.
GetStatusString
());
return
false
;
}
...
...
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -160,7 +160,7 @@ gme_file_decode(DecoderClient &client, Path path_fs)
AtScopeExit
(
emu
)
{
gme_delete
(
emu
);
};
F
ormatDebug
(
gme_domain
,
"emulator type '%s'
\n
"
,
F
mtDebug
(
gme_domain
,
"emulator type '{}'
"
,
gme_type_system
(
gme_type
(
emu
)));
#if GME_VERSION >= 0x000600
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -382,8 +382,8 @@ RecoverFrameError(const struct mad_stream &stream) noexcept
if
(
MAD_RECOVERABLE
(
stream
.
error
))
return
MadDecoderAction
::
SKIP
;
F
orma
tWarning
(
mad_domain
,
"unrecoverable frame level error: %s
"
,
F
m
tWarning
(
mad_domain
,
"unrecoverable frame level error: {}
"
,
mad_stream_errorstr
(
&
stream
));
return
MadDecoderAction
::
BREAK
;
}
...
...
@@ -571,7 +571,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) noexcept
&
lame
->
version
.
major
,
&
lame
->
version
.
minor
)
!=
2
)
return
false
;
F
ormatDebug
(
mad_domain
,
"detected LAME version %i.%i (
\"
%s
\"
)"
,
F
mtDebug
(
mad_domain
,
"detected LAME version {}.{} (
\"
{}
\"
)"
,
lame
->
version
.
major
,
lame
->
version
.
minor
,
lame
->
encoder
);
/* The reference volume was changed from the 83dB used in the
...
...
@@ -589,7 +589,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) noexcept
mad_bit_skip
(
ptr
,
16
);
lame
->
peak
=
MAD_F
(
mad_bit_read
(
ptr
,
32
)
<<
5
);
/* peak */
F
ormatDebug
(
mad_domain
,
"LAME peak found: %f"
,
double
(
lame
->
peak
)
);
F
mtDebug
(
mad_domain
,
"LAME peak found: {}"
,
lame
->
peak
);
lame
->
track_gain
=
0
;
unsigned
name
=
mad_bit_read
(
ptr
,
3
);
/* gain name */
...
...
@@ -598,8 +598,8 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) noexcept
int
gain
=
mad_bit_read
(
ptr
,
9
);
/* gain*10 */
if
(
gain
&&
name
==
1
&&
orig
!=
0
)
{
lame
->
track_gain
=
((
sign
?
-
gain
:
gain
)
/
10.0
f
)
+
adj
;
F
ormatDebug
(
mad_domain
,
"LAME track gain found: %f
"
,
double
(
lame
->
track_gain
)
);
F
mtDebug
(
mad_domain
,
"LAME track gain found: {}
"
,
lame
->
track_gain
);
}
/* tmz reports that this isn't currently written by any version of lame
...
...
@@ -614,8 +614,8 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) noexcept
gain = mad_bit_read(ptr, 9); /* gain*10 */
if (gain && name == 2 && orig != 0) {
lame->album_gain = ((sign ? -gain : gain) / 10.0) + adj;
F
ormatDebug(mad_domain, "LAME album gain found: %f
",
double(lame->track_gain)
);
F
mtDebug(mad_domain, "LAME album gain found: {}
",
lame->track_gain
);
}
#else
mad_bit_skip
(
ptr
,
16
);
...
...
@@ -626,7 +626,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) noexcept
lame
->
encoder_delay
=
mad_bit_read
(
ptr
,
12
);
lame
->
encoder_padding
=
mad_bit_read
(
ptr
,
12
);
F
ormatDebug
(
mad_domain
,
"encoder delay is %i, encoder padding is %i
"
,
F
mtDebug
(
mad_domain
,
"encoder delay is {}, encoder padding is {}
"
,
lame
->
encoder_delay
,
lame
->
encoder_padding
);
mad_bit_skip
(
ptr
,
80
);
...
...
@@ -763,8 +763,8 @@ MadDecoder::DecodeFirstFrame(Tag *tag) noexcept
return
false
;
if
(
max_frames
>
8
*
1024
*
1024
)
{
F
orma
tWarning
(
mad_domain
,
"mp3 file header indicates too many frames: %zu
"
,
F
m
tWarning
(
mad_domain
,
"mp3 file header indicates too many frames: {}
"
,
max_frames
);
return
false
;
}
...
...
src/decoder/plugins/PcmDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -101,8 +101,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
char
*
endptr
;
unsigned
value
=
ParseUnsigned
(
s
,
&
endptr
);
if
(
endptr
==
s
||
*
endptr
!=
0
)
{
F
orma
tWarning
(
pcm_decoder_domain
,
"Failed to parse sample rate: %s
"
,
F
m
tWarning
(
pcm_decoder_domain
,
"Failed to parse sample rate: {}
"
,
s
);
return
;
}
...
...
@@ -123,8 +123,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
char
*
endptr
;
unsigned
value
=
ParseUnsigned
(
s
,
&
endptr
);
if
(
endptr
==
s
||
*
endptr
!=
0
)
{
F
orma
tWarning
(
pcm_decoder_domain
,
"Failed to parse sample rate: %s
"
,
F
m
tWarning
(
pcm_decoder_domain
,
"Failed to parse sample rate: {}
"
,
s
);
return
;
}
...
...
@@ -146,8 +146,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
const
char
*
s
=
i
->
second
.
c_str
();
audio_format
=
ParseAudioFormat
(
s
,
false
);
if
(
!
audio_format
.
IsFullyDefined
())
{
F
orma
tWarning
(
pcm_decoder_domain
,
"Invalid audio format specification: %s
"
,
F
m
tWarning
(
pcm_decoder_domain
,
"Invalid audio format specification: {}
"
,
mime
);
return
;
}
...
...
@@ -157,8 +157,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
}
if
(
audio_format
.
sample_rate
==
0
)
{
F
orma
tWarning
(
pcm_decoder_domain
,
"Missing 'rate' parameter: %s
"
,
F
m
tWarning
(
pcm_decoder_domain
,
"Missing 'rate' parameter: {}
"
,
mime
);
return
;
}
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -254,8 +254,7 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
#else
const
char
*
error
=
tune
.
getInfo
().
statusString
;
#endif
FormatWarning
(
sidplay_domain
,
"failed to load file: %s"
,
error
);
FmtWarning
(
sidplay_domain
,
"failed to load file: {}"
,
error
);
return
;
}
...
...
@@ -283,8 +282,8 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
bool
error
=
player
.
load
(
&
tune
)
<
0
;
#endif
if
(
error
)
{
F
orma
tWarning
(
sidplay_domain
,
"sidplay2.load() failed: %s
"
,
player
.
error
());
F
m
tWarning
(
sidplay_domain
,
"sidplay2.load() failed: {}
"
,
player
.
error
());
return
;
}
...
...
@@ -293,16 +292,16 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
#ifdef HAVE_SIDPLAYFP
ReSIDfpBuilder
builder
(
"ReSID"
);
if
(
!
builder
.
getStatus
())
{
F
orma
tWarning
(
sidplay_domain
,
"failed to initialize ReSIDfpBuilder: %s
"
,
F
m
tWarning
(
sidplay_domain
,
"failed to initialize ReSIDfpBuilder: {}
"
,
builder
.
error
());
return
;
}
builder
.
create
(
player
.
info
().
maxsids
());
if
(
!
builder
.
getStatus
())
{
F
orma
tWarning
(
sidplay_domain
,
"ReSIDfpBuilder.create() failed: %s
"
,
F
m
tWarning
(
sidplay_domain
,
"ReSIDfpBuilder.create() failed: {}
"
,
builder
.
error
());
return
;
}
...
...
@@ -310,7 +309,7 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
ReSIDBuilder
builder
(
"ReSID"
);
builder
.
create
(
player
.
info
().
maxsids
);
if
(
!
builder
)
{
F
ormatWarning
(
sidplay_domain
,
"ReSIDBuilder.create() failed: %s
"
,
F
mtWarning
(
sidplay_domain
,
"ReSIDBuilder.create() failed: {}
"
,
builder
.
error
());
return
;
}
...
...
@@ -319,14 +318,14 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
builder
.
filter
(
sidplay_global
->
filter_setting
);
#ifdef HAVE_SIDPLAYFP
if
(
!
builder
.
getStatus
())
{
F
orma
tWarning
(
sidplay_domain
,
"ReSIDfpBuilder.filter() failed: %s
"
,
F
m
tWarning
(
sidplay_domain
,
"ReSIDfpBuilder.filter() failed: {}
"
,
builder
.
error
());
return
;
}
#else
if
(
!
builder
)
{
F
ormatWarning
(
sidplay_domain
,
"ReSIDBuilder.filter() failed: %s
"
,
F
mtWarning
(
sidplay_domain
,
"ReSIDBuilder.filter() failed: {}
"
,
builder
.
error
());
return
;
}
...
...
@@ -388,8 +387,8 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
error
=
player
.
config
(
config
)
<
0
;
#endif
if
(
error
)
{
F
orma
tWarning
(
sidplay_domain
,
"sidplay2.config() failed: %s
"
,
player
.
error
());
F
m
tWarning
(
sidplay_domain
,
"sidplay2.config() failed: {}
"
,
player
.
error
());
return
;
}
...
...
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -203,7 +203,7 @@ sndfile_stream_decode(DecoderClient &client, InputStream &is)
SNDFILE
*
const
sf
=
sf_open_virtual
(
const_cast
<
SF_VIRTUAL_IO
*>
(
&
vio
),
SFM_READ
,
&
info
,
&
sis
);
if
(
sf
==
nullptr
)
{
F
ormatWarning
(
sndfile_domain
,
"sf_open_virtual() failed: %s
"
,
F
mtWarning
(
sndfile_domain
,
"sf_open_virtual() failed: {}
"
,
sf_strerror
(
nullptr
));
return
;
}
...
...
@@ -281,8 +281,8 @@ sndfile_scan_stream(InputStream &is, TagHandler &handler)
AtScopeExit
(
sf
)
{
sf_close
(
sf
);
};
if
(
!
audio_valid_sample_rate
(
info
.
samplerate
))
{
F
orma
tWarning
(
sndfile_domain
,
"Invalid sample rate in %s
"
,
is
.
GetURI
());
F
m
tWarning
(
sndfile_domain
,
"Invalid sample rate in {}
"
,
is
.
GetURI
());
return
false
;
}
...
...
src/encoder/plugins/TwolameEncoderPlugin.cxx
View file @
b29a43b4
...
...
@@ -124,8 +124,8 @@ PreparedTwolameEncoder::PreparedTwolameEncoder(const ConfigBlock &block)
static
PreparedEncoder
*
twolame_encoder_init
(
const
ConfigBlock
&
block
)
{
F
orma
tDebug
(
twolame_encoder_domain
,
"libtwolame version %s
"
,
get_twolame_version
());
F
m
tDebug
(
twolame_encoder_domain
,
"libtwolame version {}
"
,
get_twolame_version
());
return
new
PreparedTwolameEncoder
(
block
);
}
...
...
src/encoder/plugins/meson.build
View file @
b29a43b4
...
...
@@ -53,6 +53,7 @@ encoder_plugins = static_library(
liblame_dep,
libtwolame_dep,
libshine_dep,
log_dep,
],
)
...
...
src/filter/plugins/ReplayGainFilterPlugin.cxx
View file @
b29a43b4
...
...
@@ -94,8 +94,8 @@ public:
/* no change */
return
;
F
orma
tDebug
(
replay_gain_domain
,
"replay gain mode has changed %s->%s
\n
"
,
F
m
tDebug
(
replay_gain_domain
,
"replay gain mode has changed {}->{}
"
,
ToString
(
mode
),
ToString
(
_mode
));
mode
=
_mode
;
...
...
@@ -155,8 +155,7 @@ ReplayGainFilter::Update()
if
(
mode
!=
ReplayGainMode
::
OFF
)
{
const
auto
&
tuple
=
info
.
Get
(
mode
);
float
scale
=
tuple
.
CalculateScale
(
config
);
FormatDebug
(
replay_gain_domain
,
"scale=%f
\n
"
,
(
double
)
scale
);
FmtDebug
(
replay_gain_domain
,
"scale={}
\n
"
,
scale
);
volume
=
pcm_float_to_volume
(
scale
);
}
...
...
src/filter/plugins/meson.build
View file @
b29a43b4
...
...
@@ -26,6 +26,7 @@ filter_plugins = static_library(
include_directories: inc,
dependencies: [
filter_plugins_deps,
log_dep,
],
)
...
...
src/input/plugins/AlsaInputPlugin.cxx
View file @
b29a43b4
...
...
@@ -270,15 +270,15 @@ AlsaInputStream::Recover(int err)
{
switch
(
err
)
{
case
-
EPIPE
:
F
orma
tDebug
(
alsa_input_domain
,
"Overrun on ALSA capture device
\"
%s
\"
"
,
device
.
c_str
()
);
F
m
tDebug
(
alsa_input_domain
,
"Overrun on ALSA capture device
\"
{}
\"
"
,
device
);
break
;
case
-
ESTRPIPE
:
F
orma
tDebug
(
alsa_input_domain
,
"ALSA capture device
\"
%s
\"
was suspended"
,
device
.
c_str
()
);
F
m
tDebug
(
alsa_input_domain
,
"ALSA capture device
\"
{}
\"
was suspended"
,
device
);
break
;
}
...
...
@@ -361,8 +361,8 @@ AlsaInputStream::ConfigureCapture(AudioFormat audio_format)
unsigned
buffer_time_min
,
buffer_time_max
;
snd_pcm_hw_params_get_buffer_time_min
(
hw_params
,
&
buffer_time_min
,
nullptr
);
snd_pcm_hw_params_get_buffer_time_max
(
hw_params
,
&
buffer_time_max
,
nullptr
);
F
ormatDebug
(
alsa_input_domain
,
"buffer: size=%u..%u time=%u..%u
"
,
(
unsigned
)
buffer_size_min
,
(
unsigned
)
buffer_size_max
,
F
mtDebug
(
alsa_input_domain
,
"buffer: size={}..{} time={}..{}
"
,
buffer_size_min
,
buffer_size_max
,
buffer_time_min
,
buffer_time_max
);
snd_pcm_uframes_t
period_size_min
,
period_size_max
;
...
...
@@ -371,8 +371,8 @@ AlsaInputStream::ConfigureCapture(AudioFormat audio_format)
unsigned
period_time_min
,
period_time_max
;
snd_pcm_hw_params_get_period_time_min
(
hw_params
,
&
period_time_min
,
nullptr
);
snd_pcm_hw_params_get_period_time_max
(
hw_params
,
&
period_time_max
,
nullptr
);
F
ormatDebug
(
alsa_input_domain
,
"period: size=%u..%u time=%u..%u
"
,
(
unsigned
)
period_size_min
,
(
unsigned
)
period_size_max
,
F
mtDebug
(
alsa_input_domain
,
"period: size={}..{} time={}..{}
"
,
period_size_min
,
period_size_max
,
period_time_min
,
period_time_max
);
/* choose the maximum possible buffer_size ... */
...
...
@@ -409,8 +409,8 @@ AlsaInputStream::ConfigureCapture(AudioFormat audio_format)
throw
FormatRuntimeError
(
"snd_pcm_hw_params_get_period_size() failed: %s"
,
snd_strerror
(
-
err
));
F
ormatDebug
(
alsa_input_domain
,
"buffer_size=%u period_size=%u
"
,
(
unsigned
)
alsa_buffer_size
,
(
unsigned
)
alsa_period_size
);
F
mtDebug
(
alsa_input_domain
,
"buffer_size={} period_size={}
"
,
alsa_buffer_size
,
alsa_period_size
);
snd_pcm_sw_params_t
*
sw_params
;
snd_pcm_sw_params_alloca
(
&
sw_params
);
...
...
src/input/plugins/CurlInputPlugin.cxx
View file @
b29a43b4
...
...
@@ -281,10 +281,7 @@ CurlInputStream::OnHeaders(unsigned status,
if
(
i
!=
headers
.
end
())
{
size_t
icy_metaint
=
ParseUint64
(
i
->
second
.
c_str
());
#ifndef _WIN32
/* Windows doesn't know "%z" */
FormatDebug
(
curl_domain
,
"icy-metaint=%zu"
,
icy_metaint
);
#endif
FmtDebug
(
curl_domain
,
"icy-metaint={}"
,
icy_metaint
);
if
(
icy_metaint
>
0
)
{
icy
->
Start
(
icy_metaint
);
...
...
@@ -358,9 +355,9 @@ input_curl_init(EventLoop &event_loop, const ConfigBlock &block)
const
auto
version_info
=
curl_version_info
(
CURLVERSION_FIRST
);
if
(
version_info
!=
nullptr
)
{
F
ormatDebug
(
curl_domain
,
"version %s
"
,
version_info
->
version
);
F
mtDebug
(
curl_domain
,
"version {}
"
,
version_info
->
version
);
if
(
version_info
->
features
&
CURL_VERSION_SSL
)
F
ormatDebug
(
curl_domain
,
"with %s
"
,
F
mtDebug
(
curl_domain
,
"with {}
"
,
version_info
->
ssl_version
);
}
...
...
src/input/plugins/TidalInputPlugin.cxx
View file @
b29a43b4
...
...
@@ -183,7 +183,8 @@ InitTidalInput(EventLoop &event_loop, const ConfigBlock &block)
if
(
password
==
nullptr
)
throw
PluginUnconfigured
(
"No Tidal password configured"
);
FormatWarning
(
tidal_domain
,
"The Tidal input plugin is deprecated because Tidal has changed the protocol and doesn't share documentation"
);
LogWarning
(
tidal_domain
,
"The Tidal input plugin is deprecated because Tidal has changed the protocol and doesn't share documentation"
);
tidal_audioquality
=
block
.
GetBlockValue
(
"audioquality"
,
"HIGH"
);
...
...
src/input/plugins/TidalSessionManager.cxx
View file @
b29a43b4
...
...
@@ -81,7 +81,7 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
void
TidalSessionManager
::
OnTidalLoginSuccess
(
std
::
string
_session
)
noexcept
{
F
ormatDebug
(
tidal_domain
,
"Login successful, session=%s"
,
_session
.
c_str
()
);
F
mtDebug
(
tidal_domain
,
"Login successful, session={}"
,
_session
);
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
...
...
src/lib/alsa/HwSetup.cxx
View file @
b29a43b4
...
...
@@ -235,8 +235,8 @@ SetupHw(snd_pcm_t *pcm,
unsigned
buffer_time_min
,
buffer_time_max
;
snd_pcm_hw_params_get_buffer_time_min
(
hwparams
,
&
buffer_time_min
,
nullptr
);
snd_pcm_hw_params_get_buffer_time_max
(
hwparams
,
&
buffer_time_max
,
nullptr
);
F
ormatDebug
(
alsa_output_domain
,
"buffer: size=%u..%u time=%u..%u
"
,
(
unsigned
)
buffer_size_min
,
(
unsigned
)
buffer_size_max
,
F
mtDebug
(
alsa_output_domain
,
"buffer: size={}..{} time={}..{}
"
,
buffer_size_min
,
buffer_size_max
,
buffer_time_min
,
buffer_time_max
);
snd_pcm_uframes_t
period_size_min
,
period_size_max
;
...
...
@@ -245,8 +245,8 @@ SetupHw(snd_pcm_t *pcm,
unsigned
period_time_min
,
period_time_max
;
snd_pcm_hw_params_get_period_time_min
(
hwparams
,
&
period_time_min
,
nullptr
);
snd_pcm_hw_params_get_period_time_max
(
hwparams
,
&
period_time_max
,
nullptr
);
F
ormatDebug
(
alsa_output_domain
,
"period: size=%u..%u time=%u..%u
"
,
(
unsigned
)
period_size_min
,
(
unsigned
)
period_size_max
,
F
mtDebug
(
alsa_output_domain
,
"period: size={}..{} time={}..{}
"
,
period_size_min
,
period_size_max
,
period_time_min
,
period_time_max
);
if
(
buffer_time
>
0
)
{
...
...
@@ -265,8 +265,8 @@ SetupHw(snd_pcm_t *pcm,
if
(
period_time_ro
==
0
&&
buffer_time
>=
10000
)
{
period_time_ro
=
period_time
=
buffer_time
/
4
;
F
orma
tDebug
(
alsa_output_domain
,
"default period_time = buffer_time/4 = %u/4 = %u
"
,
F
m
tDebug
(
alsa_output_domain
,
"default period_time = buffer_time/4 = {}/4 = {}
"
,
buffer_time
,
period_time
);
}
...
...
src/lib/alsa/meson.build
View file @
b29a43b4
...
...
@@ -20,6 +20,7 @@ alsa = static_library(
include_directories: inc,
dependencies: [
libasound_dep,
log_dep,
],
)
...
...
src/mixer/plugins/OssMixerPlugin.cxx
View file @
b29a43b4
...
...
@@ -153,9 +153,9 @@ OssMixer::GetVolume()
right
=
(
level
&
0xff00
)
>>
8
;
if
(
left
!=
right
)
{
F
orma
tWarning
(
oss_mixer_domain
,
"volume for left and right is not the same,
\"
%i
\"
and "
"
\"
%i
\"\n
"
,
left
,
right
);
F
m
tWarning
(
oss_mixer_domain
,
"volume for left and right is not the same,
\"
{}
\"
and "
"
\"
{}
\"\n
"
,
left
,
right
);
}
return
left
;
...
...
src/output/State.cxx
View file @
b29a43b4
...
...
@@ -70,8 +70,8 @@ audio_output_state_read(const char *line, MultipleOutputs &outputs)
name
=
endptr
+
1
;
auto
*
ao
=
outputs
.
FindByName
(
name
);
if
(
ao
==
nullptr
)
{
F
orma
tDebug
(
output_domain
,
"Ignoring device state for '%s
'"
,
name
);
F
m
tDebug
(
output_domain
,
"Ignoring device state for '{}
'"
,
name
);
return
true
;
}
...
...
src/output/plugins/AoOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -123,7 +123,7 @@ AoOutput::AoOutput(const ConfigBlock &block)
if
(
ai
==
nullptr
)
throw
std
::
runtime_error
(
"problems getting driver info"
);
F
ormatDebug
(
ao_output_domain
,
"using ao driver
\"
%s
\"
for
\"
%s
\"\n
"
,
F
mtDebug
(
ao_output_domain
,
"using ao driver
\"
{}
\"
for
\"
{}
\"\n
"
,
ai
->
short_name
,
block
.
GetBlockValue
(
"name"
,
nullptr
));
value
=
block
.
GetBlockValue
(
"options"
,
nullptr
);
...
...
src/output/plugins/FifoOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -90,8 +90,8 @@ FifoOutput::FifoOutput(const ConfigBlock &block)
inline
void
FifoOutput
::
Delete
()
{
F
orma
tDebug
(
fifo_output_domain
,
"Removing FIFO
\"
%s
\"
"
,
path_utf8
.
c_str
()
);
F
m
tDebug
(
fifo_output_domain
,
"Removing FIFO
\"
{}
\"
"
,
path_utf8
);
try
{
RemoveFile
(
path
);
...
...
src/output/plugins/HaikuOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -96,7 +96,7 @@ initialize_application()
// TODO: actually Run() it and handle B_QUIT_REQUESTED
// TODO: use some locking?
if
(
be_app
==
NULL
)
{
FormatDebug
(
haiku_output_domain
,
"creating be_app
\n
"
);
LogDebug
(
haiku_output_domain
,
"creating be_app
"
);
new
BApplication
(
"application/x-vnd.MusicPD"
);
}
}
...
...
@@ -107,7 +107,7 @@ finalize_application()
// TODO: use some locking?
delete
be_app
;
be_app
=
NULL
;
FormatDebug
(
haiku_output_domain
,
"deleting be_app
\n
"
);
LogDebug
(
haiku_output_domain
,
"deleting be_app
"
);
}
static
bool
...
...
@@ -165,17 +165,16 @@ HaikuOutput::FillBuffer(void* _buffer, size_t size,
bigtime_t
w
=
system_time
()
-
start
;
if
(
w
>
5000LL
)
{
F
orma
tDebug
(
haiku_output_domain
,
"haiku:fill_buffer waited
%Ldus
\n
"
,
w
);
F
m
tDebug
(
haiku_output_domain
,
"haiku:fill_buffer waited
{}us
"
,
w
);
}
if
(
buffer_filled
<
buffer_size
)
{
memset
(
buffer
+
buffer_filled
,
0
,
buffer_size
-
buffer_filled
);
FormatDebug
(
haiku_output_domain
,
"haiku:fill_buffer filled %d size %d clearing remainder
\n
"
,
(
int
)
buffer_filled
,
(
int
)
buffer_size
);
FmtDebug
(
haiku_output_domain
,
"haiku:fill_buffer filled {} size {} clearing remainder"
,
buffer_filled
,
buffer_size
);
}
}
...
...
@@ -222,12 +221,12 @@ HaikuOutput::Open(AudioFormat &audio_format)
format
.
channel_count
,
format
.
format
,
format
.
frame_rate
,
B_UNKNOWN_BUS
)
*
2
;
F
orma
tDebug
(
haiku_output_domain
,
"using haiku driver ad: bs: %d ws: %d
"
"channels %d rate %f fmt %08lx bs %d
\n
"
,
(
int
)
buffer_size
,
(
int
)
write_size
,
(
int
)
format
.
channel_count
,
format
.
frame_rate
,
format
.
format
,
(
int
)
format
.
buffer_size
);
F
m
tDebug
(
haiku_output_domain
,
"using haiku driver ad: bs: {} ws: {}
"
"channels {} rate {} fmt {:08x} bs {}
"
,
buffer_size
,
write_size
,
format
.
channel_count
,
format
.
frame_rate
,
format
.
format
,
format
.
buffer_size
);
sound_player
=
new
BSoundPlayer
(
&
format
,
"MPD Output"
,
HaikuOutput
::
_FillBuffer
,
NULL
,
this
);
...
...
@@ -247,8 +246,7 @@ HaikuOutput::Open(AudioFormat &audio_format)
buffer_delay
*=
1000
/
format
.
frame_rate
;
// half of the total buffer play time
buffer_delay
/=
2
;
FormatDebug
(
haiku_output_domain
,
"buffer delay: %d ms
\n
"
,
buffer_delay
);
FmtDebug
(
haiku_output_domain
,
"buffer delay: {} ms"
,
buffer_delay
);
new_buffer
=
create_sem
(
0
,
"New buffer request"
);
buffer_done
=
create_sem
(
0
,
"Buffer done"
);
...
...
@@ -303,8 +301,8 @@ HaikuOutput::Delay() const noexcept
{
unsigned
delay
=
buffer_filled
?
0
:
buffer_delay
;
//F
orma
tDebug(haiku_output_domain,
// "delay=
%d\n
", delay / 2);
//F
m
tDebug(haiku_output_domain,
// "delay=
{}
", delay / 2);
// XXX: doesn't work
//return (delay / 2) ? 1 : 0;
(
void
)
delay
;
...
...
@@ -393,8 +391,9 @@ HaikuOutput::SendTag(const Tag &tag)
case
TAG_MUSICBRAINZ_ALBUMARTISTID
:
case
TAG_MUSICBRAINZ_TRACKID
:
default
:
FormatDebug
(
haiku_output_domain
,
"tag item: type %d value '%s'
\n
"
,
item
.
type
,
item
.
value
);
FmtDebug
(
haiku_output_domain
,
"tag item: type {} value '{}'
\n
"
,
item
.
type
,
item
.
value
);
break
;
}
}
...
...
src/output/plugins/JackOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -242,8 +242,8 @@ JackOutput::JackOutput(const ConfigBlock &block)
/* compatibility with MPD < 0.16 */
value
=
block
.
GetBlockValue
(
"ports"
,
nullptr
);
if
(
value
!=
nullptr
)
F
orma
tWarning
(
jack_output_domain
,
"deprecated option 'ports' in line %d
"
,
F
m
tWarning
(
jack_output_domain
,
"deprecated option 'ports' in line {}
"
,
block
.
line
);
}
...
...
@@ -258,9 +258,9 @@ JackOutput::JackOutput(const ConfigBlock &block)
if
(
num_destination_ports
>
0
&&
num_destination_ports
!=
num_source_ports
)
F
orma
tWarning
(
jack_output_domain
,
"number of source ports (%u
) mismatches the "
"number of destination ports (%u) in line %d
"
,
F
m
tWarning
(
jack_output_domain
,
"number of source ports ({}
) mismatches the "
"number of destination ports ({}) in line {}
"
,
num_source_ports
,
num_destination_ports
,
block
.
line
);
...
...
@@ -543,10 +543,9 @@ JackOutput::Start()
for
(
num_dports
=
0
;
num_dports
<
MAX_PORTS
&&
jports
[
num_dports
]
!=
nullptr
;
++
num_dports
)
{
FormatDebug
(
jack_output_domain
,
"destination_port[%u] = '%s'
\n
"
,
num_dports
,
jports
[
num_dports
]);
FmtDebug
(
jack_output_domain
,
"destination_port[{}] = '{}'
\n
"
,
num_dports
,
jports
[
num_dports
]);
dports
[
num_dports
]
=
jports
[
num_dports
];
}
}
else
{
...
...
src/output/plugins/OSXOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -258,9 +258,10 @@ osx_output_parse_channel_map(const char *device_name,
channel_map_str
=
endptr
;
want_number
=
false
;
FormatDebug
(
osx_output_domain
,
"%s: channel_map[%u] = %d"
,
device_name
,
inserted_channels
,
channel_map
[
inserted_channels
]);
FmtDebug
(
osx_output_domain
,
"{}: channel_map[{}] = {}"
,
device_name
,
inserted_channels
,
channel_map
[
inserted_channels
]);
++
inserted_channels
;
continue
;
}
...
...
@@ -421,10 +422,10 @@ osx_output_set_device_format(AudioDeviceID dev_id,
// print all (linear pcm) formats and their rating
if
(
score
>
0.0
f
)
F
orma
tDebug
(
osx_output_domain
,
"Format: %s rated %f
"
,
F
m
tDebug
(
osx_output_domain
,
"Format: {} rated {}
"
,
StreamDescriptionToString
(
format_desc
).
c_str
(),
(
double
)
score
);
score
);
if
(
score
>
output_score
)
{
output_score
=
score
;
...
...
@@ -498,14 +499,14 @@ osx_output_hog_device(AudioDeviceID dev_id, bool hog) noexcept
if
(
hog
)
{
if
(
hog_pid
!=
-
1
)
{
Format
Debug
(
osx_output_domain
,
"Device is already hogged.
"
);
Log
Debug
(
osx_output_domain
,
"Device is already hogged
"
);
return
;
}
}
else
{
if
(
hog_pid
!=
getpid
())
{
F
orma
tDebug
(
osx_output_domain
,
"Device is not owned by this process.
"
);
F
m
tDebug
(
osx_output_domain
,
"Device is not owned by this process
"
);
return
;
}
}
...
...
@@ -520,9 +521,8 @@ osx_output_hog_device(AudioDeviceID dev_id, bool hog) noexcept
size
,
&
hog_pid
);
if
(
err
!=
noErr
)
{
FormatDebug
(
osx_output_domain
,
"Cannot hog the device: %d"
,
err
);
FmtDebug
(
osx_output_domain
,
"Cannot hog the device: {}"
,
err
);
}
else
{
LogDebug
(
osx_output_domain
,
hog_pid
==
-
1
...
...
@@ -585,16 +585,16 @@ osx_output_set_device(OSXOutput *oo)
const
auto
id
=
FindAudioDeviceByName
(
oo
->
device_name
);
F
orma
tDebug
(
osx_output_domain
,
"found matching device: ID=%u, name=%s
"
,
(
unsigned
)
id
,
oo
->
device_name
);
F
m
tDebug
(
osx_output_domain
,
"found matching device: ID={}, name={}
"
,
id
,
oo
->
device_name
);
AudioUnitSetCurrentDevice
(
oo
->
au
,
id
);
oo
->
dev_id
=
id
;
F
orma
tDebug
(
osx_output_domain
,
"set OS X audio output device ID=%u, name=%s
"
,
(
unsigned
)
id
,
oo
->
device_name
);
F
m
tDebug
(
osx_output_domain
,
"set OS X audio output device ID={}, name={}
"
,
id
,
oo
->
device_name
);
if
(
oo
->
channel_map
)
osx_output_set_channel_map
(
oo
);
...
...
src/output/plugins/OssOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -200,16 +200,16 @@ oss_open_default()
/* never reached */
break
;
case
OSS_STAT_DOESN_T_EXIST
:
F
orma
tWarning
(
oss_output_domain
,
"%s
not found"
,
dev
);
F
m
tWarning
(
oss_output_domain
,
"{}
not found"
,
dev
);
break
;
case
OSS_STAT_NOT_CHAR_DEV
:
F
orma
tWarning
(
oss_output_domain
,
"%s
is not a character device"
,
dev
);
F
m
tWarning
(
oss_output_domain
,
"{}
is not a character device"
,
dev
);
break
;
case
OSS_STAT_NO_PERMS
:
F
orma
tWarning
(
oss_output_domain
,
"%s
: permission denied"
,
dev
);
F
m
tWarning
(
oss_output_domain
,
"{}
: permission denied"
,
dev
);
break
;
case
OSS_STAT_OTHER
:
FormatErrno
(
oss_output_domain
,
err
[
i
],
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -19,6 +19,7 @@
#include "RecorderOutputPlugin.hxx"
#include "../OutputAPI.hxx"
#include "lib/fmt/PathFormatter.hxx"
#include "tag/Format.hxx"
#include "encoder/ToOutputStream.hxx"
#include "encoder/EncoderInterface.hxx"
...
...
@@ -276,8 +277,7 @@ RecorderOutput::ReopenFormat(AllocatedPath &&new_path)
path
=
std
::
move
(
new_path
);
file
=
new_file
;
FormatDebug
(
recorder_domain
,
"Recording to
\"
%s
\"
"
,
path
.
ToUTF8
().
c_str
());
FmtDebug
(
recorder_domain
,
"Recording to
\"
{}
\"
"
,
path
);
}
void
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -282,8 +282,8 @@ ShoutOutput::Close() noexcept
if
(
shout_get_connected
(
shout_conn
)
!=
SHOUTERR_UNCONNECTED
&&
shout_close
(
shout_conn
)
!=
SHOUTERR_SUCCESS
)
{
F
orma
tWarning
(
shout_output_domain
,
"problem closing connection to shout server: %s
"
,
F
m
tWarning
(
shout_output_domain
,
"problem closing connection to shout server: {}
"
,
shout_get_error
(
shout_conn
));
}
}
...
...
src/output/plugins/httpd/HttpdClient.cxx
View file @
b29a43b4
...
...
@@ -171,8 +171,8 @@ HttpdClient::SendResponse() noexcept
ssize_t
nbytes
=
GetSocket
().
Write
(
response
,
strlen
(
response
));
if
(
gcc_unlikely
(
nbytes
<
0
))
{
const
SocketErrorMessage
msg
;
F
orma
tWarning
(
httpd_output_domain
,
"failed to write to client: %s
"
,
F
m
tWarning
(
httpd_output_domain
,
"failed to write to client: {}
"
,
(
const
char
*
)
msg
);
LockClose
();
return
false
;
...
...
@@ -284,8 +284,8 @@ HttpdClient::TryWrite() noexcept
if
(
!
IsSocketErrorClosed
(
e
))
{
SocketErrorMessage
msg
(
e
);
F
orma
tWarning
(
httpd_output_domain
,
"failed to write to client: %s
"
,
F
m
tWarning
(
httpd_output_domain
,
"failed to write to client: {}
"
,
(
const
char
*
)
msg
);
}
...
...
@@ -311,8 +311,8 @@ HttpdClient::TryWrite() noexcept
if
(
!
IsSocketErrorClosed
(
e
))
{
SocketErrorMessage
msg
(
e
);
F
orma
tWarning
(
httpd_output_domain
,
"failed to write to client: %s
"
,
F
m
tWarning
(
httpd_output_domain
,
"failed to write to client: {}
"
,
(
const
char
*
)
msg
);
}
...
...
@@ -334,8 +334,8 @@ HttpdClient::TryWrite() noexcept
if
(
!
IsSocketErrorClosed
(
e
))
{
SocketErrorMessage
msg
(
e
);
F
orma
tWarning
(
httpd_output_domain
,
"failed to write to client: %s
"
,
F
m
tWarning
(
httpd_output_domain
,
"failed to write to client: {}
"
,
(
const
char
*
)
msg
);
}
...
...
@@ -370,7 +370,7 @@ HttpdClient::PushPage(PagePtr page) noexcept
return
;
if
(
queue_size
>
256
*
1024
)
{
Format
Debug
(
httpd_output_domain
,
Log
Debug
(
httpd_output_domain
,
"client is too slow, flushing its queue"
);
ClearQueue
();
}
...
...
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
View file @
b29a43b4
...
...
@@ -26,6 +26,7 @@
#include "PropertyStore.hxx"
#include "output/OutputAPI.hxx"
#include "lib/icu/Win32.hxx"
#include "lib/fmt/AudioFormatFormatter.hxx"
#include "mixer/MixerList.hxx"
#include "output/Error.hxx"
#include "pcm/Export.hxx"
...
...
@@ -824,13 +825,12 @@ WasapiOutput::TryFormatExclusive(const AudioFormat &audio_format)
HRESULT
result
=
client
->
IsFormatSupported
(
AUDCLNT_SHAREMODE_EXCLUSIVE
,
reinterpret_cast
<
WAVEFORMATEX
*>
(
&
test_format
),
nullptr
);
const
auto
format_string
=
ToString
(
audio_format
);
const
auto
result_string
=
std
::
string
(
HRESULTToString
(
result
));
F
ormatDebug
(
wasapi_output_domain
,
"Trying %s %lu %u-%u (exclusive) -> %s
"
,
format_string
.
c_str
()
,
test_format
.
Format
.
nSamplesPerSec
,
F
mtDebug
(
wasapi_output_domain
,
"Trying {} {} {}-{} (exclusive) -> {}
"
,
audio_format
,
test_format
.
Format
.
nSamplesPerSec
,
test_format
.
Format
.
wBitsPerSample
,
test_format
.
Samples
.
wValidBitsPerSample
,
result_string
.
c_str
()
);
result_string
);
if
(
SUCCEEDED
(
result
))
{
device_format
=
test_format
;
return
true
;
...
...
@@ -922,13 +922,12 @@ WasapiOutput::FindSharedFormatSupported(AudioFormat &audio_format)
reinterpret_cast
<
WAVEFORMATEX
*>
(
&
device_format
),
closest_format
.
AddressCast
<
WAVEFORMATEX
>
());
{
const
auto
format_string
=
ToString
(
audio_format
);
const
auto
result_string
=
std
::
string
(
HRESULTToString
(
result
));
F
ormatDebug
(
wasapi_output_domain
,
"Trying %s %lu %u-%u (shared) -> %s
"
,
format_string
.
c_str
()
,
device_format
.
Format
.
nSamplesPerSec
,
F
mtDebug
(
wasapi_output_domain
,
"Trying {} {} {}-{} (shared) -> {}
"
,
audio_format
,
device_format
.
Format
.
nSamplesPerSec
,
device_format
.
Format
.
wBitsPerSample
,
device_format
.
Samples
.
wValidBitsPerSample
,
result_string
.
c_str
()
);
result_string
);
}
if
(
FAILED
(
result
)
&&
result
!=
AUDCLNT_E_UNSUPPORTED_FORMAT
)
{
...
...
@@ -950,15 +949,14 @@ WasapiOutput::FindSharedFormatSupported(AudioFormat &audio_format)
reinterpret_cast
<
WAVEFORMATEX
*>
(
&
device_format
),
closest_format
.
AddressCast
<
WAVEFORMATEX
>
());
{
const
auto
format_string
=
ToString
(
audio_format
);
const
auto
result_string
=
std
::
string
(
HRESULTToString
(
result
));
F
orma
tDebug
(
wasapi_output_domain
,
"Trying %s %lu %u-%u (shared) -> %s
"
,
format_string
.
c_str
()
,
F
m
tDebug
(
wasapi_output_domain
,
"Trying {} {} {}-{} (shared) -> {}
"
,
audio_format
,
device_format
.
Format
.
nSamplesPerSec
,
device_format
.
Format
.
wBitsPerSample
,
device_format
.
Samples
.
wValidBitsPerSample
,
result_string
.
c_str
()
);
result_string
);
}
if
(
FAILED
(
result
))
{
throw
MakeHResultError
(
result
,
"Format is not supported"
);
...
...
src/pcm/LibsamplerateResampler.cxx
View file @
b29a43b4
...
...
@@ -71,8 +71,8 @@ pcm_resample_lsr_global_init(const ConfigBlock &block)
throw
FormatRuntimeError
(
"unknown samplerate converter '%s'"
,
converter
);
F
orma
tDebug
(
libsamplerate_domain
,
"libsamplerate converter '%s
'"
,
F
m
tDebug
(
libsamplerate_domain
,
"libsamplerate converter '{}
'"
,
src_get_name
(
lsr_converter
));
}
...
...
@@ -98,8 +98,8 @@ LibsampleratePcmResampler::Open(AudioFormat &af, unsigned new_sample_rate)
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
src_ratio
=
double
(
new_sample_rate
)
/
double
(
af
.
sample_rate
);
F
orma
tDebug
(
libsamplerate_domain
,
"setting samplerate conversion ratio to %.2lf
"
,
F
m
tDebug
(
libsamplerate_domain
,
"setting samplerate conversion ratio to {:.2}
"
,
data
.
src_ratio
);
src_set_ratio
(
state
,
data
.
src_ratio
);
...
...
src/pcm/SoxrResampler.cxx
View file @
b29a43b4
...
...
@@ -200,8 +200,7 @@ pcm_resample_soxr_global_init(const ConfigBlock &block)
soxr_quality
=
soxr_quality_spec
(
recipe
,
0
);
}
FormatDebug
(
soxr_domain
,
"soxr converter '%s'"
,
FmtDebug
(
soxr_domain
,
"soxr converter '{}'"
,
soxr_quality_name
(
recipe
));
const
unsigned
n_threads
=
block
.
GetBlockValue
(
"threads"
,
1
);
...
...
@@ -226,7 +225,7 @@ SoxrPcmResampler::Open(AudioFormat &af, unsigned new_sample_rate)
throw
FormatRuntimeError
(
"soxr initialization has failed: %s"
,
e
);
F
ormatDebug
(
soxr_domain
,
"soxr engine '%s
'"
,
soxr_engine
(
soxr
));
F
mtDebug
(
soxr_domain
,
"soxr engine '{}
'"
,
soxr_engine
(
soxr
));
if
(
soxr_use_custom_recipe
)
FormatDebug
(
soxr_domain
,
"soxr precision=%0.0f, phase_response=%0.2f, "
...
...
src/pcm/meson.build
View file @
b29a43b4
...
...
@@ -69,6 +69,7 @@ pcm = static_library(
pcm_basic_dep,
libsamplerate_dep,
soxr_dep,
log_dep,
],
)
...
...
src/player/CrossFade.cxx
View file @
b29a43b4
...
...
@@ -128,8 +128,8 @@ CrossFadeSettings::Calculate(SignedSongTime total_time,
mixramp_delay
<=
mixramp_overlap
)
{
chunks
=
lround
((
mixramp_overlap
-
mixramp_delay
)
/
chunk_duration
);
F
orma
tDebug
(
cross_fade_domain
,
"will overlap %d chunks, %f
s"
,
chunks
,
F
m
tDebug
(
cross_fade_domain
,
"will overlap {} chunks, {}
s"
,
chunks
,
(
mixramp_overlap
-
mixramp_delay
).
count
());
}
}
...
...
src/queue/Playlist.cxx
View file @
b29a43b4
...
...
@@ -71,7 +71,7 @@ playlist::QueueSongOrder(PlayerControl &pc, unsigned order) noexcept
const
DetachedSong
&
song
=
queue
.
GetOrder
(
order
);
F
ormatDebug
(
playlist_domain
,
"queue song %i:
\"
%s
\"
"
,
F
mtDebug
(
playlist_domain
,
"queue song {}:
\"
{}
\"
"
,
queued
,
song
.
GetURI
());
pc
.
LockEnqueueSong
(
std
::
make_unique
<
DetachedSong
>
(
song
));
...
...
@@ -178,7 +178,7 @@ playlist::PlayOrder(PlayerControl &pc, unsigned order)
const
DetachedSong
&
song
=
queue
.
GetOrder
(
order
);
F
ormatDebug
(
playlist_domain
,
"play %u:
\"
%s
\"
"
,
order
,
song
.
GetURI
());
F
mtDebug
(
playlist_domain
,
"play {}:
\"
{}
\"
"
,
order
,
song
.
GetURI
());
current
=
order
;
...
...
src/queue/PlaylistControl.cxx
View file @
b29a43b4
...
...
@@ -36,7 +36,7 @@ playlist::Stop(PlayerControl &pc) noexcept
assert
(
current
>=
0
);
Format
Debug
(
playlist_domain
,
"stop"
);
Log
Debug
(
playlist_domain
,
"stop"
);
pc
.
LockStop
();
queued
=
-
1
;
playing
=
false
;
...
...
src/zeroconf/Bonjour.cxx
View file @
b29a43b4
...
...
@@ -79,8 +79,8 @@ BonjourHelper::Callback([[maybe_unused]] DNSServiceRef sdRef,
helper
.
Cancel
();
}
else
{
F
orma
tDebug
(
bonjour_domain
,
"Registered zeroconf service with name '%s
'"
,
F
m
tDebug
(
bonjour_domain
,
"Registered zeroconf service with name '{}
'"
,
name
);
}
}
...
...
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