Replace code with existing support function
This commit is contained in:
parent
c7eebacde9
commit
e8e9e0ef4f
1 changed files with 2 additions and 3 deletions
|
@ -148,11 +148,10 @@ uint32_t CDROM_Interface_Image::BinaryFile::decode(int16_t *buffer,
|
|||
CDROM_Interface_Image::AudioFile::AudioFile(const char *filename, bool &error)
|
||||
: TrackFile(4096)
|
||||
{
|
||||
// Use the audio file's actual sample rate and number of channels as opposed to overriding
|
||||
// Use the audio file's sample rate and number of channels as-is
|
||||
Sound_AudioInfo desired = {AUDIO_S16, 0, 0};
|
||||
sample = Sound_NewSampleFromFile(filename, &desired);
|
||||
std::string filename_only(filename);
|
||||
filename_only = filename_only.substr(filename_only.find_last_of("\\/") + 1);
|
||||
const std::string filename_only = get_basename(filename);
|
||||
if (sample) {
|
||||
error = false;
|
||||
LOG_MSG("CDROM: Loaded %s [%d Hz, %d-channel, %2.1f minutes]",
|
||||
|
|
Loading…
Add table
Reference in a new issue