CDImage: Include the WAV file's details when incompatible

This commit is contained in:
Stenzek 2025-07-11 21:25:06 +10:00
parent 2308c5ddc6
commit 2fad6478b4
No known key found for this signature in database

View File

@ -3,6 +3,7 @@
#include "cd_image.h"
#include "cue_parser.h"
#include "host.h"
#include "wav_reader_writer.h"
#include "common/align.h"
@ -618,7 +619,10 @@ bool CDImageCueSheet::OpenAndParseCueSheet(const char* path, Error* error)
{
if (reader.GetNumChannels() != AUDIO_CHANNELS || reader.GetSampleRate() != AUDIO_SAMPLE_RATE)
{
Error::SetStringFmt(error, "WAV files must be stereo and use a sample rate of 44100hz.");
Error::SetStringFmt(error,
TRANSLATE_FS("CDImage", "{0} uses a sample rate of {1}hz and has {2} channels.\n"
"WAV files must be stereo and use a sample rate of 44100hz."),
Path::GetFileName(track_filename), reader.GetSampleRate(), reader.GetNumChannels());
return false;
}