Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: .WAV: It's for short sound effects.  (Read 2521 times)

Sensei

  • Bay Watcher
  • Haven't tried coffee crisps.
    • View Profile
.WAV: It's for short sound effects.
« on: December 11, 2009, 10:27:06 pm »

It occurred to me whens seeing that the "QUALITY!" in the intro was a .ogg sound file, that Toady might be wise to switch to .wav for short sound effects.

What is the long term benefit of this? It would make simple to add sound effects over the existing background music, without interrupting anything. .WAV is used by a lot of shooters as the file format of choice gunshot sounds, which come up frequently over other sounds.

Now, I'm not suggesting we need sound effects for dwarves mining or anything. But, easy audio alerts to things like artifacts being completed, caravans arriving, striking ores, and so on would make it less likely for players to miss announcements. Obviously, these could be turned on and off in the init file.
Logged
Let's Play: Automation! Bay 12 Motor Company Buy the 1950 Urist Wagon for just $4500! Safety features optional.
The Bay 12 & Mates Discord Join now! Voice/text chat and play games with other Bay12'ers!
Add me on Steam: [DFC] Sensei

Foa

  • Bay Watcher
  • And I thought foxfire was stylish in winter.
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #1 on: December 11, 2009, 10:54:16 pm »

Yeah, this would improve the whole, ADD SFX ALERTS, AND SITUATIONAL BGM thing.
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #2 on: December 12, 2009, 02:41:02 am »

OGG and WAV are both usable, but OGG is more flexible, since you can use it for short sound effects and for lengthier things like music and dialog (you just know that eventually DF is going to include a speech synthesizer!). I'm not aware of any particular reason why WAV is better than OGG for short sounds, and it'd be better, for consistency's sake if nothing else, to only use one sound format.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #3 on: December 12, 2009, 03:11:43 am »

For context:

# Core21, SOUND, (Future): Make all music/sounds optional, in groups. More songs (possibly seasonal), incidental music (like spotting the first kobold in a cave, etc.), various combat type sounds and ambient sounds, pleasing interface clicks.
# Bloat277, SOUND EVENTS, (Future): Removal of annoying off-screen combat spam and replacement with sound events that have displayed locations. Selection of the sound event might show a further breakdown of associated announcements. Might be very useful if screen is blanked out on blinding.
Logged

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #4 on: December 12, 2009, 06:53:42 am »

Ogg and wave files appearently can both be sent directly into an OpenAL buffer.
So except for the decode time associated with and Ogg-Vorbis file compared to a wave file which is often in uncompressed Pulse Code Modulation, they should be nearly the same. Probably slightly less latency using uncompressed waves and probably a little more memory usage...

Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #5 on: December 12, 2009, 10:36:51 am »

It occurred to me whens seeing that the "QUALITY!" in the intro was a .ogg sound file, that Toady might be wise to switch to .wav for short sound effects.

What is the long term benefit of this? It would make simple to add sound effects over the existing background music, without interrupting anything. .WAV is used by a lot of shooters as the file format of choice gunshot sounds, which come up frequently over other sounds.
Not really. The overwhelming majority of engines support WAV and AIFF because supporting them is trivial, but most games use MP3 or OGG for PCM-encoded sound effects. They are used because they are compressed. Using WAV provides zero benefit except an entirely undetectable difference in sound quality. (For files of the size being discussed, decode time is negligible. It's trivial to spin off a sound queue into another thread, anyway, so it shouldn't matter.)

Quote
Now, I'm not suggesting we need sound effects for dwarves mining or anything. But, easy audio alerts to things like artifacts being completed, caravans arriving, striking ores, and so on would make it less likely for players to miss announcements. Obviously, these could be turned on and off in the init file.
This has nothing to do with file type; you can make a two-second OGG file just as easily as you can make a twenty-minute one. These two topics seem unrelated.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #6 on: December 12, 2009, 02:02:41 pm »

It's trivial to spin off a sound queue into another thread, anyway, so it shouldn't matter.)
Yeah, it may be trivial, but NOTHING has been broken off into a separate thread ANYWHERE in dwarf fortress... I seriously doubt it will start now.  Would be nice.. but it's not gonna happen.

(I know it says there are 4 threads while DF is running... I am betting they are the 3 threads started by compiling a program with boost... Let me check battle champs.... Hmm I musta removed its source, anyhow I cant imagine toad would compile without using the boost libraries since they handle so much low level I/O crap.)




Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #7 on: December 13, 2009, 01:41:04 am »

It's trivial to spin off a sound queue into another thread, anyway, so it shouldn't matter.)
Yeah, it may be trivial, but NOTHING has been broken off into a separate thread ANYWHERE in dwarf fortress... I seriously doubt it will start now.  Would be nice.. but it's not gonna happen.

(I know it says there are 4 threads while DF is running... I am betting they are the 3 threads started by compiling a program with boost... Let me check battle champs.... Hmm I musta removed its source, anyhow I cant imagine toad would compile without using the boost libraries since they handle so much low level I/O crap.)
Doesn't Baughn's stuff run in its own thread?

And besides--you only decode once.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #8 on: December 13, 2009, 10:56:54 am »

The sound sample is decoded JIT every time it plays... but it's not any more intensive than playing an MP3.  Just might cause some latency and may cause a hesitation in the game if it isn't dumped on another thread *Which will not happen by design, maybe by chance*

Besides that? I really don't know too much about openAL.. Honestly I don't know that toad is even using it... just seems likely that he is seeing he uses openGL already.


Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Pilsu

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #9 on: December 22, 2009, 08:26:07 am »

Now, I'm not suggesting we need sound effects for dwarves mining or anything.

Hearing dwarves mine, party etc would add a lot to the game in my opinion
Logged

madrain

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #10 on: December 22, 2009, 04:57:18 pm »

Hearing dwarfs mine would be torture.  I keep more than one miner in my fort and they are often working in the same area at the same time.  80+ clinks a minute?  No thank you.

Hearing a dwarf drown when falling into a river, hearing one scream when falling into magma, hearing one weep when its baby is killed by a goblin.. now that would be boss.
Logged

Pilsu

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #11 on: December 23, 2009, 12:00:22 pm »

Obviously the sounds wouldn't overlap.
Logged

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: .WAV: It's for short sound effects.
« Reply #12 on: December 23, 2009, 12:18:56 pm »

remember Warcraft 2?  Those sounds were pretty cool... For a while...

As they said... ogg -> compression and quality.

Wav's superior quality can only be noticed if you have some nice earphones and some good ears... :P
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Pilsu

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #13 on: December 23, 2009, 12:50:46 pm »

Well, if they get annoying, one could always turn them off. Or replace the most annoying ones with blank files

I don't think it'd be that grating to hear a faint tinking sound when seeing dwarves mine on screen
Logged

sproingie

  • Bay Watcher
    • View Profile
Re: .WAV: It's for short sound effects.
« Reply #14 on: December 23, 2009, 02:01:25 pm »

DF is definitely not using OpenAL, and more than likely it's using SDL's mixer.  OpenAL has little to do with OpenGL other than having an API that's inspired by OpenGL.  It's not maintained by the same organization as OpenGL.  OpenGL is used in DF because it's the only way to get a decently fast framebuffer these days. 

Positioned sounds would be nice though (think every Impressions/Tilted Mill game), so count me in as a vote for OpenAL if and when sound effects are added.
Logged
Toady is the man who Peter Molyneux wishes he was

Quote from: ToadyOne
dragon pus was like creamy gold. Infect and collect!
Pages: [1] 2