http://bugs.winehq.org/show_bug.cgi?id=20472
--- Comment #13 from Chris chris.kcat@gmail.com 2009-10-27 09:00:43 --- Hmm, actually now that I give it a closer listen, I think I do hear it. Newer OpenAL's interpolate very close sounds better, so older versions could hard pan the engine to the front or back, as opposed to just slightly panned one way or the other.
I would have to say it's an app bug. The game uses Direct3D for rendering, while OpenAL's coordinate system follows OpenGL (ie. inverted Z positioning). It's possible that if they didn't properly account for that (eg. inverted the X axis instead of the Z), it would put things in back that are supposed to be in front, and vice-versa. And since the usual output for OpenAL, especially on Windows, is stereo with no front/back panning, it's quite likely they didn't catch it.
I can't say for sure since I don't have the code, but my best guess would have to be that it's an app problem. In that case, the same thing would happen on Windows if OpenAL Soft was used with surround sound, or with a hardware driver that does surround sound. If someone could double-check that on real Windows...
If you want to work around the issue, you can force TrackMania to use stereo. You can create a file somewhere, call it tm-alsoft.cfg, and put in:
format = AL_FORMAT_STEREO16
Create a shell script, export ALSOFT_CONF=<full-path-to>/tm-alsoft.cfg and run wine TmForeverLauncher.exe. Options in tm-alsoft.cfg will then overrides the ones in ~/.alsoftrc, making TrackMania use stereo while other OpenAL apps will still use surround sound. You may also need to set a different device under the [alsa] heading, but I don't know if the surround51 device will accept stereo output.