diff options
Diffstat (limited to 'Tests/LibAudio/TestFLACSpec.cpp')
-rw-r--r-- | Tests/LibAudio/TestFLACSpec.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/LibAudio/TestFLACSpec.cpp b/Tests/LibAudio/TestFLACSpec.cpp index 23a040d1e1..487d3d9aa4 100644 --- a/Tests/LibAudio/TestFLACSpec.cpp +++ b/Tests/LibAudio/TestFLACSpec.cpp @@ -21,14 +21,16 @@ struct FlacTest : Test::TestCase { void run() const { - auto loader = Audio::FlacLoaderPlugin { m_path.string() }; - if (auto result = loader.initialize(); result.is_error()) { + auto result = Audio::FlacLoaderPlugin::try_create(m_path.string()); + if (result.is_error()) { FAIL(String::formatted("{} (at {})", result.error().description, result.error().index)); return; } + auto loader = result.release_value(); + while (true) { - auto maybe_samples = loader.get_more_samples(2 * MiB); + auto maybe_samples = loader->get_more_samples(2 * MiB); if (maybe_samples.is_error()) { FAIL(String::formatted("{} (at {})", maybe_samples.error().description, maybe_samples.error().index)); return; |