Ogg is open source cross-platform audio format, it is compressed audio with Vorbis codec,which is less popular but more reliable than any other codec.(or something like that). Wav is a microsoft uncompressed audio standart. To compress it, one must use codecs, so I doubd it ,that a compressed wav is better than ogg.
Ogg files are very small . This is why I use PyGame. I should have a look at pysound and pysonic as well. I just use PyGame because I stumbled across a thread on how to use it
At this moment, i’m trying to solve these things :-).
I have been cleaned a bit OpenAL part of SoundSystem Blender library to use OpenAL-Soft and ALURE(ALUT sustitute).
I can reproduce perfectly the previous features (.wav files, etc) and now I’m trying to modify the load sound code to listen some OGG or Flac files.
This is the patch with the modifications that i’ve done until now.
http://jbernalmartinez.googlepages.com/openalsoft-alure.txt
I think these modifications will activate the BGE sound in MACOSX intel but i can’t test it. So that, if you have MACOSX intel, compile Openal-Soft, Alure, apply the patch and test it!!
Wow, the miracle of open source, you ask for something that’s missing in the program only to find it’s being worked on by someone.
Thank you for trying to expand sound support Bernel, if you can you should also try to allow playing of .mp3 files as well.
Of course. ALURE supports mp3 too. When i get to run Ogg files automatically mp3 files will work without problems too.
Good, because .mp3 files for games are very common on the internet and I’m not sure of any site containing huge amounts of .ogg’s.
Will this allow more sounds to play at the same time? This is the reason I have moved over to PySound rather than the system that the BGE has at present.
Glenn
Yes. I have increased the number to 256 sounds (this number could be higher if would be necessary). Anyway it depends if your processor has the enough power to play them.
For Openal-Soft creator :
OpenAL Soft, which is a software OpenAL implementation, works comfortably on a 900MHz x86 processor running Windows with ~100 sounds playing at once.
As is a software implementation it will depend of your processor. With a Pentium 1 perhaps (if you are a lucky man) you can play 10 sounds at the same time.
P.D.
a screenshot of 90 sounds playing at the same time (well separate 2 tics each one to can differentiate them)
Okay, small feature request, but nothing fancy or anything that’ll require a lot of work.
How about a simple option to set the priority of the sound played, so if your maximum is 100 sounds it would go like this.
1). You set the background music to have a priority of 1
2). You set the boxes hitting ground sound effect to have a priority of 0
3). When more then 100 sounds are playing, it’ll only stop playing some of the priority 0 sounds and never the priority 1 sound.
Campbell increased the sounds capacity of the BGE to 32 for Yo-frankie, but the priority setting would be the best solution.
for consistency you should have priority 0 > 1, like the armatures. The lower the more important
That would work too.
The screen with the different types of sound file is really sweet looking, good work.
Sweet, by 2.5 Blender game engine will be respectable in almost every aspect.
Jorge Bernal, any updates on the BGE sound enhancements? And is there a patch with the newest stuff including the multiple sound file formats that people can make builds for and for Ben2610 to review?
This evening i will upload the patch with newest stuff, but I have to think (yet) how to use ffmpeg library to load sound files in lieu of ALURE (which depends of libsoundfile, mpg123 and vorbis libraries) and this way we have a system of load files (video and sound) more homogeneous (only depending of ffmpeg library).
Moreover, I want to add support for enviroment sound effects (such as reverberation or low pass filter throught OpenAL-Soft EFX extension) and support for 5.1, 6.1 & 7.1 channels.
Perphaps another thing that it would be necessary is to can choose how you are going to play your sound and/or your music, from memory or from streaming. each one has its own advantanges and problems:
- From memory has the problem that all the file is descompress in memory (for example an Ogg or Mp3 background music file would use 70Mb more or less) and the advantange that it use a bit less CPU power than stream. This method is appropiated for sounds (shoots, hit, bells, etc)
- From stream has the problem that it use a bit more CPU power than memory method but it uses a lot less memory (90% less) than the memory method. This method is appropiated for music backgrounds.
I must say I like your vision. Hope you make it work! keep it up!
Newest patch:
http://jbernalmartinez.googlepages.com/patch-openal-alure.txt
Can reproduce: Ogg, Mp3, Flac and Wav compressed and uncompressed formats.
Can reproduce until 256 sound at the same time.
May be works in MacOSX intel (not tested).
You have to compile Openal-Soft and ALURE (with libsoundfile, vorbisfile or libmpg123 if you want reproduce compressed wav’s, ogg or mp3 files, respectively) and install it in your system. After, you have to replace alut library (in user-config.py) for alure.
That’s all, folks. I will continue with my plan.
That’s great that builds of Blender can play multiple sound formats now.
For those building Blender, just make sure you zip the required sound DLL’s into the download.
I forgot it. The previous patch already incorporate support for mono, stereo, 4.1, 5.1, 6.1 & 7.1 channels too (throught ALURE library).
Sweet, keep us updated