Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Background sound #286097
08/23/09 00:47
08/23/09 00:47
Joined: Aug 2009
Posts: 8
Moscow, Russia
INeedMySPace Offline OP
Newbie
INeedMySPace  Offline OP
Newbie

Joined: Aug 2009
Posts: 8
Moscow, Russia
Hi!

I'm confused with strange snd_loop behavior.

hdlCurrent = snd_loop(music_1, 100, 0);

It plays my background sound, but it place it somewhere in 3D and when I move and rotate my camera I hear sound moving from one speaker to another. Can I change this behavior?

When I use media_loop instead, music is played like it should be (like in media player). But when new loop begins - where is some little delay and noise sound between iterations. Can I preload music files for media_loop to play seamless?

What is the best practice to play background sound loops?
Thanks in advance for any solution.

Re: Background sound [Re: INeedMySPace] #286112
08/23/09 07:10
08/23/09 07:10
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Make sure there is no silence at the begining of your music file you may need
to edit the music file of course to get rid of the silence at the begining and the end. Also proberly a fade in/out wouldn't hurt either unless you don't want this type of action.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Background sound [Re: INeedMySPace] #286127
08/23/09 09:55
08/23/09 09:55
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Originally Posted By: INeedMySPace
Hi!

I'm confused with strange snd_loop behavior.

hdlCurrent = snd_loop(music_1, 100, 0);

It plays my background sound, but it place it somewhere in 3D and when I move and rotate my camera I hear sound moving from one speaker to another. Can I change this behavior?

When I use media_loop instead, music is played like it should be (like in media player). But when new loop begins - where is some little delay and noise sound between iterations. Can I preload music files for media_loop to play seamless?

What is the best practice to play background sound loops?
Thanks in advance for any solution.


Hmm snd_loop should play the sound in 2D and i see that you have the balance set to 0 so it is equal on either speaker. Playing a sound in 3D would use ent_playloop.

media_loop streams the music, and so preloading the file is the opposite of what it is supposed to do. For using preloaded files you have to use the snd_play/loop functions.

Re: Background sound [Re: INeedMySPace] #286352
08/24/09 21:51
08/24/09 21:51
Joined: Aug 2009
Posts: 8
Moscow, Russia
INeedMySPace Offline OP
Newbie
INeedMySPace  Offline OP
Newbie

Joined: Aug 2009
Posts: 8
Moscow, Russia
I brought my code to different PC and found that music sound now as it should be (without 3D effect), so there is some bug (or special behavior) with my sound card drivers I think. It sound crazy, but PC itself is only difference.

Re: Background sound [Re: INeedMySPace] #288054
09/03/09 20:07
09/03/09 20:07
Joined: Aug 2009
Posts: 8
Moscow, Russia
INeedMySPace Offline OP
Newbie
INeedMySPace  Offline OP
Newbie

Joined: Aug 2009
Posts: 8
Moscow, Russia
There is workaround for this bug, i found it here at forum. You can fix it by lowering or disabling hardware acceleration for sound in sound card properties - in my case it helps setting basic acceleration level. It may help somebody else.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1