char magic[4];
if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1)
throw SoundError("Couldn't read magic, file too short");
char magic[4];
if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1)
throw SoundError("Couldn't read magic, file too short");
if(strncmp(magic, "RIFF", 4) == 0)
return std::unique_ptr<SoundFile>(new WavSoundFile(file));
else if(strncmp(magic, "OggS", 4) == 0)
if(strncmp(magic, "RIFF", 4) == 0)
return std::unique_ptr<SoundFile>(new WavSoundFile(file));
else if(strncmp(magic, "OggS", 4) == 0)