Well, won't we be needing ffmpeg anyway for the Bink support?Ace (SWE) wrote:Unfortunately I disagree with removing Audiere support, both ffmpeg and mpg123+libsndfile need a Cygwin and MingW install to properly compile and use in Windows.
Sound Improvements
Re: Sound Improvements
Re: Sound Improvements
SDL_sound might be an easier alternative to Audiere. It can load wav and mp3 files, and is probably easier to get a hold of on Windows and Linux.
Unless something else comes along, though, ffmpeg will be needed to support Bink videos. AFAIK, it's the only free and open lib that can decode both video and audio from it (gstreamer can, but only because of its ffmpeg plugin, and gstreamer itself doesn't work too well for general audio decoding).
Unless something else comes along, though, ffmpeg will be needed to support Bink videos. AFAIK, it's the only free and open lib that can decode both video and audio from it (gstreamer can, but only because of its ffmpeg plugin, and gstreamer itself doesn't work too well for general audio decoding).
Re: Sound Improvements
This is not true. They are probably mostly used in such setups but they have native (as in .lib/.dll) builds for windows. i don't know if they have visual studio projects for building but as they ship precompiled binaries this shouldn't be a reason to hold on longer to an outdated lib like Audiere.Ace (SWE) wrote:Unfortunately I disagree with removing Audiere support, both ffmpeg and mpg123+libsndfile need a Cygwin and MingW install to properly compile and use in Windows.
I completely disagree with using SDL_sound because it depends on SDL and this will result in having a lot of unnecessary dependencies. Also i would consider mixing OGRE and SDL as generally bad.Chris wrote:SDL_sound might be an easier alternative to Audiere. It can load wav and mp3 files, and is probably easier to get a hold of on Windows and Linux.
Unless something else comes along, though, ffmpeg will be needed to support Bink videos. AFAIK, it's the only free and open lib that can decode both video and audio from it (gstreamer can, but only because of its ffmpeg plugin, and gstreamer itself doesn't work too well for general audio decoding).
Re: Sound Improvements
ffmpeg does include a dev build, you need to edit the headers a bit though as it was built against cygwin and uses some includes that don't exist in a native Windows environment.K1ll wrote:This is not true. They are probably mostly used in such setups but they have native (as in .lib/.dll) builds for windows. i don't know if they have visual studio projects for building but as they ship precompiled binaries this shouldn't be a reason to hold on longer to an outdated lib like Audiere.
Got OpenMW to compile against it after modifying a few files, unfortunately so far it refuses to run because of .dll issues. I'll report back later if I get it working, otherwise I think I can take the task of keeping Audiere support.
Re: Sound Improvements
Your sound-rewrite doesn't merge cleanly. Can you merge in my master branch please?
Re: Sound Improvements
Done. I hope it did that correctly.Zini wrote:Your sound-rewrite doesn't merge cleanly. Can you merge in my master branch please?
BTW, how should I handle resource loading (reading sound files, etc)? The original/current code mainly uses normal IO functions, but that obviously won't work with BSAs, so I'm not sure what it should be using. The Mangle::VFS/OgreVFS stuff? Or should I just use Ogre's resource functions directly?
Re: Sound Improvements
If you know how to integrate sound with the OGRE resources system that would be the best option. Currently sound resources have a separate implementation and everything is run through OGRE. Obviously that is far from ideal.
Re: Sound Improvements
It seems to be working now using Ogre's resource management stuff. Something odd I noticed is that the music files are each listed 3 times. I think that's due to OMW::Engine::loadBSA loading the same data dir 3 times (as Morrowind.bsa, Tribunal.bsa, and Bloodmoon.bsa are all in ./data, and each BSA loaded also loads the directory it's in).
Re: Sound Improvements
I am not sure if I understand exactly what you mean. But having a file show up multiple times is expected (depending on the state of your MW installation). The same file existing in a bsa and in the file system is one issue. The same file existing in multiple data path locations is another (currently disabled). At some point we need to implement a conflict resolution method for these cases, that is based on file priority.
Re: Sound Improvements
In apps/openmw/engine.cpp:Zini wrote:I am not sure if I understand exactly what you mean. But having a file show up multiple times is expected (depending on the state of your MW installation). The same file existing in a bsa and in the file system is one issue. The same file existing in multiple data path locations is another (currently disabled). At some point we need to implement a conflict resolution method for these cases, that is based on file priority.
Code: Select all
void OMW::Engine::loadBSA()
{
const Files::MultiDirCollection& bsa = mFileCollections.getCollection (".bsa");
std::string dataDirectory;
for (Files::MultiDirCollection::TIter iter(bsa.begin()); iter!=bsa.end(); ++iter)
{
std::cout << "Adding " << iter->second.string() << std::endl;
Bsa::addBSA(iter->second.string());
dataDirectory = iter->second.parent_path().string();
std::cout << "Data dir " << dataDirectory << std::endl;
Bsa::addDir(dataDirectory, mFSStrict);
}
}
Battle, Explore, Special, Battle, Explore, Special, Battle, Explore, and Special.
If I search one of those sub-directories, e.g. Music/Explore/*, I get each explore music listed three times. The music directory only exists on disk in the Data Files directory.