[osgaudio-users] osgaudio example, "high-e.wav not found" message

16 views
Skip to first unread message

Paul Martz

unread,
May 7, 2010, 5:52:04 PM5/7/10
to osgaudi...@googlegroups.com
Hi Chris (and others) --

In the example_osgaudio, source file osgaudio.cpp, line 415, the example creates
a sample like this:

osgAudio::Sample *sample = new osgAudio::Sample("high-e.wav");

This doesn't appear to use the OSG_FILE_PATH to find the file, and in fact fails
to load the file. I modified the example to do this:

osgAudio::Sample *sample = new osgAudio::Sample(
osgDB::findDataFile( "high-e.wav" ) );

But I'm wondering if the better approach would be to modify the osgAudio::Sample
constructor to actually do this on behalf of the application? After all, it is
an osgAudio object (not an underlying audio back-end construct).

What do you think?

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

--
You received this message because you are subscribed to the Google Groups "osgAudio-users" group.
To post to this group, send email to osgaudi...@googlegroups.com.
To unsubscribe from this group, send email to osgaudio-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osgaudio-users?hl=en.

Paul Martz

unread,
May 10, 2010, 6:35:20 PM5/10/10
to osgAudio-users
FYI, I've modified the example to use findDataFile, and checked in
that change. I've also opened an issue for this in the issue tracker.
Reply all
Reply to author
Forward
0 new messages