Blitz3d confusing normal sound for 3d sound?

Blitz3D Forums/Blitz3D Programming/Blitz3d confusing normal sound for 3d sound?

Cubed Inc.(Posted 2015) [#1]
I was implementing an ambient channel to one of the levels in my latest project Boxing Day when one of the strangest things to happen to me in the six years I've been using Blitz3d occurred. For God knows what reason, the program identifies the ambient sound as a 3d sound and places the level itself as the main source (the entity emitting the sound) without any piece of code telling it to do so.

Naturally assuming that I did something wrong, I went back through the code which loads and plays the sound and found absolutely no evidence of it loading the ambient sound as a 3d sound or telling it to emit from the level. Absolutely none. Not a single command, line, or digit. It's like the thing's friggin' haunted or something.

After the tenth time of testing and searching, I decided to just get rid of the ambient sound and continue on with the meat of the project; but nonetheless, the problem is still vexing.

Has anyone ever experienced the same issue? It's an utter anomaly to me...


Cubed Inc.(Posted 2015) [#2]
I went back and did some more experimentation, and found that this enigma occurs only when applying a wav format sound to a channel. I still have no idea why, though...


RemiD(Posted 2015) [#3]
It could be a bug, but it is probably an error in your code...
This may happen if you use the same variable name in your program to store different things, especially if it is in the same part (function) of the program or if it is a global.

My advice would be to create a simplified code example where you load and play the same 3dsounds and the same ambientsounds. You will see if the problem persists or not.

Also consider that if you set a 3dsound as a child of the listener, then it should behave like an ambientsound (=never changes volume) ?


RGR(Posted 2015) [#4]
What is your OS? Win 8? Then the answer could be, that it is a Win8 *Feature* ;-)
Win8 is so generous to change wav Sounds while loading them - Mono to Stereo ... User shall have best sound experience ...

But I have never had Problems with Blitz3D with that feature. Only with 3DRad. Because 3DRad-Programs test if the sound is a Mono Wav while loading all files and stops with an error message if it detects Stereo (converted by Win8) ... Solution in this case: use Ogg only ...

Btw.: That's how I found that Win8 feature ...


Cubed Inc.(Posted 2015) [#5]
Well, I am using Windows 8, and I'm also 99 percent positive there's nothing wrong with my code; so the only solution I can think of is to convert wav ambient sounds into mp3s through Audacity.

Oh, Windows 8... Always locking-in features without users' permission because it knows what's 'best' for us. I just love going through extra steps for mundane things...

At least its start-up is fast.


RemiD(Posted 2015) [#6]
It would be good if you could provide a simple code example to illustrate the problem so that we can confirm that it is really a bug, or maybe help you to identify the error and provide a solution.


Cubed Inc.(Posted 2015) [#7]
Here's an obviously heavily-abridged version of the code, just to give you the basic idea.




RGR(Posted 2015) [#8]
Ogg is license free while mp3 is not - and the quality is equal.

You already wrote that it only happens with wav and if it does not show the error with ogg its the Win8 feature (automatic wav conversion).

Since Win 8 I have converted all wavs in programs to ogg to be on the safe side...


Your Code looks ok
You could add ChannelVolume(lavaambiancechannel, 0.6) ;or higher
On some Systems Sound rapidly vanishes if its 0.5 and below.


RemiD(Posted 2015) [#9]
Sorry Cubed Inc. but i can't confirm if this is a bug if you don't provide a code example with sounds that i can run...


Cubed Inc.(Posted 2015) [#10]
Thank you for telling me this, RGR. The game I'm currently working on is freeware, and all musical assets used will be credited. From now on I'll use oggs for global channels.


RemiD(Posted 2015) [#11]
Let us know if the problem persists or not with others ambient sounds. It would interesting to understand what is the cause of this sound problem.


Cubed Inc.(Posted 2015) [#12]
The problem is not caused by the specific ambient sound, but rather its format, and how Blitz3d on Windows 8 handles it when applied to channels. The inconvenience is negligible, but annoying nonetheless. Words cannot describe how much I miss making games on my Windows 7 laptop. No crummy sound glitches; no absurdly-long updates; the ability to use FastExt to make my games look like they didn't come from the early 2000's.

Good times.


Rroff(Posted 2015) [#13]
I've found it best to use external sound APIs (fmod, blitzal, etc.) with B3D none the least if using 3D audio given the mess MS have made of it when using directsound in Windows.