FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: [1] 2

Author Topic: Audio module redesign  (Read 15093 times)

anxs

  • Newbie
  • Posts: 14
    • View Profile
Audio module redesign
« on: October 19, 2007, 11:10:13 am »

This thread is to provide a general overview about the development of the new audio module

Already done:
  • Wav decoder
  • Ogg/Vorbis decoder
  • SoundClip - represents an audio file, provides openAL-buffers and supports multiple streams of the same file

TODO:
  • Advanced Error/Exception-Handling
  • ACM decoder
  • SoundManager: Device Enumeration/Selection

Known Issues:
  • Due to a currently unknown bug audio is not played in stereo.

Update:
1 November 2007 - The Playback of non-streaming files is supported, now working on the streaming-support.
11 November 2007 - Streaming works, got to go on with the soundemitter-functions
25 November 2007 - Basic emitter-handling works, all emitter-functions available, module is ready for testing...
« Last Edit: November 25, 2007, 05:31:23 am by anxs »
Logged

anxs

  • Newbie
  • Posts: 14
    • View Profile
Re: Audio module redesign
« Reply #1 on: November 26, 2007, 11:49:47 am »

Hurray!   ;D
The audio branch is working at last and now ready for testing. If everything works fine (and for me it does) we can merge the branch with trunk very soon and keep on working on the "specials" as the basic functionality is now given.

During the coding-progress I got away from the original design document in some parts of the code, because some ideas simply didn't work. ;-) I'll try to update the design documents soon.

At last I have a new idea for the audio module. We first planned to implement one volume function for static emitters, one for dynamic ones and one master volume. Up to now there's only a master-volume function, because I want to implement a class to group several soundemitters together. All soundemitters, which are attached to a specific soundgroup inherit the volume-setting of this group. (but each soundemitter still has it's own gain setting, which is merged with the group-volume)
By attaching soundgroups to each other it will be possible to create chains of volume settings. The gain value of the corresponding the openAL-source of an attached soundemitter will be calculated and applied automatically.
In addition soundgroups make it possible to start/stop/pause the playback of a bunch of soundemitters at the same time.

Any comments and/or questions?



Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Audio module redesign
« Reply #2 on: November 26, 2007, 12:01:39 pm »

The audio branch is working at last and now ready for testing. If everything works fine (and for me it does)

[..]

All soundemitters, which are attached to a specific soundgroup inherit the volume-setting of this group. (but each soundemitter still has it's own gain setting, which is merged with the group-volume)


Nice one :)

Sounds like the hardware mixer for my turntables  ;D

anxs

  • Newbie
  • Posts: 14
    • View Profile
Re: Audio module redesign
« Reply #3 on: November 26, 2007, 12:17:37 pm »

 ;D yeah, when it's finished we create a FIFE Jukebox with integrated mixing-feature ^^
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #4 on: November 28, 2007, 02:48:24 pm »

Reply from the OpenAL channel concerning the win32 warning:
Quote
<KittyCat> barraAway, you can't call alBufferData on a buffer that's attached to a source (either by alSourcei(source, AL_BUFFER, ...) or alSourceQueueBuffers)
<KittyCat> the SI erroniously allows it, but you're not supposed to be able to
Logged

anxs

  • Newbie
  • Posts: 14
    • View Profile
Re: Audio module redesign
« Reply #5 on: December 22, 2007, 11:04:29 am »

Well I want to start a discussion if it's really necessary to integrate wav-support to FIFE.
In my mind it would be a better solution to support FLAC instead of the wav format. Flac-files are often smaller than wavs and it's a free audio codec. This would also solve the problem with hundreds of different wav-formats. (-> more)
Furthermore it doesn't seem to be very easy to find a working high quality wav decoder. (Even the decoder from the Allacrost project does not work quite well)

What do you think?
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Audio module redesign
« Reply #6 on: December 22, 2007, 11:34:12 am »

We at Zero-Projekt won´t use *.wav - we convert all our sounds to ogg.

Personally, I´d say flac would be nice - and are there really still people who need wav these days? ^^

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Audio module redesign
« Reply #7 on: December 22, 2007, 12:33:23 pm »

since its easy to convert .wav and etc to .ogg i guess there is no need to support everything :)
Logged

jasoka

  • Developer
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Audio module redesign
« Reply #8 on: January 12, 2008, 09:35:36 am »

Good work anxs with the audio module, I'm also pleased to see the progress in that area :)

About audio format support:
I'm fine of not implementing any other format than ogg for fife at this given moment. Even ACM could be done a bit later, in case we decide to focus on island techdemo for now. Instead of additional formats, would you like to take a task of integrating sounds as part of actions, so that e.g. gunshots sounds can be synchronized with animations in engine side?
Logged

anxs

  • Newbie
  • Posts: 14
    • View Profile
Re: Audio module redesign
« Reply #9 on: January 12, 2008, 01:03:23 pm »

Thanks jasoka :)

The integration of sounds as part of actions is already on my todo-list and I'll try to finish the task before 2008.0 gets shipped. Unfortunately I'm currently very busy with my skilled work, so not much time for FIFE  :( , but this will be hopefully finished until 25 january.
Logged

jasoka

  • Developer
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Audio module redesign
« Reply #10 on: January 17, 2008, 04:29:12 pm »

There's some adjustments to be made in the automatic testing suite; currently when tests are run in sequence, audio tests fail. I added my speculation here: https://mirror1.cvsdude.com/trac/fife/engine/ticket/149

Hopefully you can check it out at some point, anxs
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #11 on: February 02, 2008, 04:16:09 am »

vja, a new interested developer did send in a patch for the sound effects ticket listed here:
http://mirror1.cvsdude.com/trac/fife/engine/ticket/192

The patch itself seems to be a full patch containing the modified files instead of a DIFF but it shouldn't be too hard to apply it. Could anyone check the patch file and apply it to the SVN trunk in case it looks like a good solution for this ticket? In case you got some time on your hand anxs, it would be great if you could look into it as you're the person on the development team who's most familiar with our audio code.
Logged

vja

  • Newbie
  • Posts: 1
    • View Profile
Re: Audio module redesign
« Reply #12 on: February 13, 2008, 05:06:45 am »

I propose to determine all effects, that we shall adding to FIFE, because of that depend implementation way.
Any ideas will be appreciate.

Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #13 on: February 13, 2008, 09:42:36 am »

i think, what necessary minimize users operation with add/remove/control/configure sound effects, i. e. all sound effects found in soundemmiter and user dont create effects.
Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #14 on: February 15, 2008, 09:50:42 am »

stereo in linux.

im guess the best way - use openal-soft. (http://kcat.strangesoft.net/openal.html)

it easy integrated to fife-project:
before first linux build checking installing this library (/usr/local/lib/libopenal.so), if dont exist - user goto trunk/ext/openal-soft/ and installed this (how minizip).
after install original library dont remove - other applications use original openal library.

next: fife_openal.h
Code: [Select]
// Platform specific includes
// Linux
#if defined( __unix__ )
#include <AL/al.h>
#include <AL/alc.h>
#endif

change to
Code: [Select]
// Platform specific includes
// Linux
#if defined( __unix__ )
#include "/usr/local/include/AL/al.h"
#include "/usr/local/include/AL/alc.h"
#endif
and link new library.

for easy install - may be create install_openal-soft.sh executable script (as root, may in this scipt added installation for minizip, may be with install missing packets (for make, scons, cmake and other ??)

and linux users enjoy stereo music in fife!  :)

single trouble: if create this, linux users have trouble with compilation after svn update - library dont exist.
but this is single time. run install_openal-soft.sh. (for example, minizip necessary for installation).

second way: if library dont installed - link to project original library, and include original headers (in automatic - checking and switching link libraries and headers).
« Last Edit: February 15, 2008, 09:57:37 am by sja »
Logged
Pages: [1] 2