Skip to content

Commit 25c0f8a

Browse files
swesterfeldtim-janik
authored andcommitted
devices/liquidsfz/liquidsfz.cc: avoid using printf (use printerr instead)
Signed-off-by: Stefan Westerfeld <[email protected]>
1 parent 966f87f commit 25c0f8a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

devices/liquidsfz/liquidsfz.cc

+5-6
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ class LiquidSFZLoader
3535
{
3636
if (want_sfz_ != have_sfz_)
3737
{
38-
printf ("LiquidSFZ: loading %s...", want_sfz_.c_str());
39-
fflush (stdout);
38+
printerr ("LiquidSFZ: loading %s...", want_sfz_.c_str());
4039
bool result = synth_.load (want_sfz_);
41-
printf ("%s\n", result ? "OK" : "FAIL");
40+
printerr ("%s\n", result ? "OK" : "FAIL");
4241
// TODO: handle load error
4342

4443
have_sfz_ = want_sfz_;
@@ -51,22 +50,22 @@ class LiquidSFZLoader
5150
state_.store (STATE_IDLE);
5251
}
5352
}
54-
printf ("run() done\n");
53+
printerr ("LiquidSFZ: run() done\n");
5554
}
5655
public:
5756
LiquidSFZLoader (Synth &synth) :
5857
synth_ (synth)
5958
{
6059
thread_ = std::thread (&LiquidSFZLoader::run, this);
6160
want_sfz_.reserve (4096); // avoid allocations in audio thread
62-
printf ("LiquidSFZLoader()\n");
61+
printerr ("LiquidSFZLoader()\n");
6362
}
6463
~LiquidSFZLoader()
6564
{
6665
quit_.store (1);
6766
sem_.post();
6867
thread_.join();
69-
printf ("~LiquidSFZLoader()\n");
68+
printerr ("~LiquidSFZLoader()\n");
7069
}
7170
// called from audio thread
7271
bool

0 commit comments

Comments
 (0)