1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Piano: Use new format functions.

This commit is contained in:
asynts 2020-10-06 14:25:02 +02:00 committed by Andreas Kling
parent 5aadf00463
commit 377afff33a
2 changed files with 3 additions and 3 deletions

View file

@ -113,7 +113,7 @@ SamplerWidget::SamplerWidget(TrackManager& track_manager)
return;
String error_string = m_track_manager.current_track().set_recorded_sample(open_path.value());
if (!error_string.is_empty()) {
GUI::MessageBox::show(window(), String::format("Failed to load WAV file: %s", error_string.characters()), "Error", GUI::MessageBox::Type::Error);
GUI::MessageBox::show(window(), String::formatted("Failed to load WAV file: {}", error_string.characters()), "Error", GUI::MessageBox::Type::Error);
return;
}
m_recorded_sample_name->set_text(open_path.value());

View file

@ -66,7 +66,7 @@ int main(int argc, char** argv)
LibThread::Thread audio_thread([&] {
auto audio = Core::File::construct("/dev/audio");
if (!audio->open(Core::IODevice::WriteOnly)) {
dbgprintf("Can't open audio device: %s", audio->error_string());
dbgln("Can't open audio device: {}", audio->error_string());
return 1;
}
@ -102,7 +102,7 @@ int main(int argc, char** argv)
return;
wav_writer.set_file(save_path.value());
if (wav_writer.has_error()) {
GUI::MessageBox::show(window, String::format("Failed to export WAV file: %s", wav_writer.error_string()), "Error", GUI::MessageBox::Type::Error);
GUI::MessageBox::show(window, String::formatted("Failed to export WAV file: {}", wav_writer.error_string()), "Error", GUI::MessageBox::Type::Error);
wav_writer.clear_error();
return;
}