Locations?

  • 82 Replies
  • 37489 Views
*

Offline sergiocornaga

  • 1286
  • 131
    • View Profile
    • Sergio's Games
Re: Locations?
« Reply #75 on: April 05, 2011, 14:44:07 »
Your call! Couldn't decide if that idea was neat or just annoying, so that's probably for the best.

*

Offline mato

  • 21
  • 0
    • View Profile
Re: Locations?
« Reply #76 on: April 06, 2011, 04:43:59 »
Regarding the low pass filter you could try faking it by making two versions of the song and then cross-fade between them depending on the distance.

*

Offline Nifflas

  • 1532
  • 61
    • View Profile
Re: Locations?
« Reply #77 on: April 06, 2011, 10:44:29 »
Yes, which is where the problem synchronizing several audio tracks comes in. However, it seems like I'm getting good enough results, though it's not sample accurate.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Locations?
« Reply #78 on: April 06, 2011, 12:44:29 »
If you start the song from close by before the song from far away (with low pas filter), you might actually add a bit of realism, because sound travels further and thus gets to you at a later stage.

Its questionable if there will be any chorus due to duplicate sounds clashing.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline Nifflas

  • 1532
  • 61
    • View Profile
Re: Locations?
« Reply #79 on: April 06, 2011, 15:57:22 »
Well, that's what I fear basically, a small delay causing phase offset problems. The problem is also that I don't know how different the delay will be depending on hardware (soundcard, cpu). I'm probably going to create a test tool that people can try on their computers which will tell me how much desynchronization every new musical layer will add on the system it's tested on. If the results are bad on some systems, I won't add the feature.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Locations?
« Reply #80 on: April 06, 2011, 18:28:08 »
I have a high end system and a low end. I can help you test it on either to tell you how big the difference is. That should give you some comparison. If the difference is neglectable, you shouldn't have to worry that much.

I bet that any delays on the sound due to hardware will happen on both audio streams at the same time and speed, so by setting both positions to 0 should give the same delay on every system, depending on the length of the song. (I bet that a longer song will have a larger footprint thus making setting it to 0 a slightly longer task)
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline Nifflas

  • 1532
  • 61
    • View Profile
Re: Locations?
« Reply #81 on: April 07, 2011, 00:44:08 »
Quote
I bet that any delays on the sound due to hardware will happen on both audio streams at the same time and speed, so by setting both positions to 0 should give the same delay on every system, depending on the length of the song.
Of course the playback speed will remain constant, but since the audio position resets are triggered from a separate thread, and not simultanely, I'm sure the delay is not a constant, since the game speed itself isn't. In fact, in all my games I have to compensate for a MMF2 design mistake, which directly involves a delay between multiple sound actions, that varies per system and CPU usage, and is very closely related to this (though it's about modifying the volume of a sound). Luckily, I know a workaround for that.

However, I'm positive that the delay isn't constant. Seriously, I don't make that kind of mistakes, I know MMF2 inside and out.
« Last Edit: April 07, 2011, 00:47:03 by Nifflas »

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Locations?
« Reply #82 on: April 07, 2011, 09:36:42 »
I didn't want to offend you. :)

I was just brainstorming I guess.

But I'll look forward to test this for you as soon as you have a testing method ready.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex