diff options
author | Vas Crabb <vas@vastheman.com> | 2020-03-10 18:21:10 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2020-03-10 18:21:10 +1100 |
commit | 9c600695f0ed4456270bf5f1676b8fadaed34127 (patch) | |
tree | 1e52fb8b786e9bece80b05e2f583bba207f5af7c /src/devices | |
parent | cc70fe02bacdf8dc17fe75065e387276c8056e5e (diff) |
(nw) Cleanup on the way:
* Add doxygen comments for bit manipulation functions
* Add an overload of BIT that works like the AArch64 UBFX instruction
* Kill off some of the silly concatenating overloads for emu_file::open
* Make searchpath acually useful for devices
This is a checkpoint - I'm planning to improve ROM loading behaviour at
least a little.
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/sound/samples.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp index f03ee6fe275..82ce481e72e 100644 --- a/src/devices/sound/samples.cpp +++ b/src/devices/sound/samples.cpp @@ -605,7 +605,7 @@ bool samples_device::load_samples() return false; // iterate over ourself - const char *basename = machine().basename(); + const std::string &basename = machine().basename(); samples_iterator iter(*this); const char *altbasename = iter.altbasename(); @@ -618,15 +618,15 @@ bool samples_device::load_samples() { // attempt to open as FLAC first emu_file file(machine().options().sample_path(), OPEN_FLAG_READ); - osd_file::error filerr = file.open(basename, PATH_SEPARATOR, samplename, ".flac"); + osd_file::error filerr = file.open(util::string_format("%s" PATH_SEPARATOR "%s.flac", basename, samplename)); if (filerr != osd_file::error::NONE && altbasename != nullptr) - filerr = file.open(altbasename, PATH_SEPARATOR, samplename, ".flac"); + filerr = file.open(util::string_format("%s" PATH_SEPARATOR "%s.flac", altbasename, samplename)); // if not, try as WAV if (filerr != osd_file::error::NONE) - filerr = file.open(basename, PATH_SEPARATOR, samplename, ".wav"); + filerr = file.open(util::string_format("%s" PATH_SEPARATOR "%s.wav", basename, samplename)); if (filerr != osd_file::error::NONE && altbasename != nullptr) - filerr = file.open(altbasename, PATH_SEPARATOR, samplename, ".wav"); + filerr = file.open(util::string_format("%s" PATH_SEPARATOR "%s.wav", altbasename, samplename)); // if opened, read it if (filerr == osd_file::error::NONE) |