//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
#if defined( __APPLE__ )
# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
if (buffer == AL_NONE) {
ALenum error = alutGetError ();
print_openal_error("constructor (alutCreateBufferFromFile)");
- throw sg_exception("Failed to load wav file: "+string(alutGetErrorString (error)));
+ throw sg_io_exception("Failed to load wav file: ",
+ sg_location(string(alutGetErrorString (error))));
}
#else
ALfloat freqf;
data = alutLoadMemoryFromFile(samplepath.c_str(), &format, &size, &freqf );
if (data == NULL) {
- throw sg_exception("Failed to load wav file.");
+ throw sg_io_exception("Failed to load wav file.",
+ sg_location(samplepath.str()));
}
freq = (ALsizei)freqf;
#else
&format, &data, &size, &freq, &loop );
# endif
if ( print_openal_error("constructor (alutLoadWAVFile)") ) {
- throw sg_exception("Failed to load wav file.");
+ throw sg_io_exception("Failed to load wav file.",
+ sg_location(samplepath.str()));
}
#endif