diff options
Diffstat (limited to 'src/audio/wavfile.cc')
-rw-r--r-- | src/audio/wavfile.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/audio/wavfile.cc b/src/audio/wavfile.cc index 3e3ca2b..58afca7 100644 --- a/src/audio/wavfile.cc +++ b/src/audio/wavfile.cc @@ -16,18 +16,13 @@ namespace audio { -PCM *Wav::load(std::string const & name) +PCM *Wav::load(std::string const & filename) { - if (!name.size()) + if (!filename.size()) return 0; - std::string filename("sounds/"); - filename.append(name); - filename.append(".wav"); - filesystem::File *wav_file = filesystem::open(filename.c_str()); if (!wav_file) { - con_warn << "Could not open " << filename << std::endl; return 0; } @@ -115,7 +110,7 @@ PCM *Wav::load(std::string const & name) } if (total_bytes < datasize) { - con_warn << "Error reading " << filename << ": file truncated!" << std::endl; + con_warn << "Error reading " << filename << ": file appears to be truncated!" << std::endl; } con_debug << " " << filename << " " << pcm->samplerate() << "Hz " << pcm->bitspersample() << "bit " << |