Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 793 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
A5.24 downgrade: play_sound/snd_play problem #84395
08/03/06 11:06
08/03/06 11:06
Joined: Jun 2003
Posts: 183
Austria/Österreich
zeroX1 Offline OP
Member
zeroX1  Offline OP
Member

Joined: Jun 2003
Posts: 183
Austria/Österreich
Hi.
I have installed A5.24 commercial edition. Everything works well, except the play_sound/snd_play and the play_loop/snd_loop functions. These functions almost never work, when the balance value is set to 0 or another value which is not far away from 0. I am using Windows XP with the latest sound drivers for my motherboard (I'm using onboard-sound, my motherboard is a MSI Platinum K8N Neo4). 3D-sound with play_entsound/ent_playsound works. Is there any solution for this problem?

Re: A5.24 downgrade: play_sound/snd_play problem [Re: zeroX1] #84396
08/03/06 19:01
08/03/06 19:01
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

Hi.
I have installed A5.24 commercial edition. Everything works well, except the play_sound/snd_play and the play_loop/snd_loop functions. These functions almost never work, when the balance value is set to 0 or another value which is not far away from 0. I am using Windows XP with the latest sound drivers for my motherboard (I'm using onboard-sound, my motherboard is a MSI Platinum K8N Neo4). 3D-sound with play_entsound/ent_playsound works. Is there any solution for this problem?





Show us how your using this in your main script...
I know the sounds must be defined but if you didn't have them
defined in your script they would most likely never play.
Off the top of my head I would say you have a pointer problem.

Did you write your own script or are you using a template?
Just go ahead and post your script here and I'll look at it.



*** Teutonic Darkness ***

Re: A5.24 downgrade: play_sound/snd_play problem [Re: TeutonicDarkness] #84397
08/03/06 20:27
08/03/06 20:27
Joined: Jun 2003
Posts: 183
Austria/Österreich
zeroX1 Offline OP
Member
zeroX1  Offline OP
Member

Joined: Jun 2003
Posts: 183
Austria/Österreich
It doesn't work with the templates and it doesn't work with my own script. What exactly do you mean with defining the sounds? Of course I make the engine load them with the sound keyword, if you mean that. I have found out now, that the play_sound function and snd_play with balance set to 0 work, if the same sound was played with a balance value away from 0 before and no other sound was played in the maintime.

Re: A5.24 downgrade: play_sound/snd_play problem [Re: zeroX1] #84398
08/03/06 22:23
08/03/06 22:23
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

It doesn't work with the templates and it doesn't work with my own script. What exactly do you mean with defining the sounds? Of course I make the engine load them with the sound keyword, if you mean that. I have found out now, that the play_sound function and snd_play with balance set to 0 work, if the same sound was played with a balance value away from 0 before and no other sound was played in the maintime.




Ok.. I really have nothing to go on here without seeing what your doing
and how your trying to do it.

Are you trying to have a sound played in a level or is it
more of an event triggered sound?

If you could give me an explantion of "exactly" what your trying
to do and how your doing it in the script....
well it would be helpfull to diagnose what the problem is...


I'll await your reply


*** Teutonic Darkness ***

Re: A5.24 downgrade: play_sound/snd_play problem [Re: TeutonicDarkness] #84399
08/04/06 08:45
08/04/06 08:45
Joined: Jun 2003
Posts: 183
Austria/Österreich
zeroX1 Offline OP
Member
zeroX1  Offline OP
Member

Joined: Jun 2003
Posts: 183
Austria/Österreich
When I start the office demo, I can't hear the player's walking sound and the menu sounds. What I want to do: I want to use play_sound or snd_play to play sounds like walking, other actions of the player, and menu sounds without having to move them to the left or the right side. I have created a little script which allows me to test the sound commands:
Code:
var video_mode = 6;
var video_depth = 16;

string level_str = <soundproblem.WMB>;

sound test_snd = <BEAMER.WAV>;
sound beep_snd = <beep.wav>;

function main()
{
level_load(level_str);
}

action listener
{
player = my;
while (1)
{
waitt(32);
snd_play(test_snd, 100, 0); // works, if balancedsound was called after the last playersound
} // call and the last balancedbeep call (and at least once)
}

function playersound()
{
if (player == null) { return; }
play_entsound(player, test_snd, 100); // works always
}

function normalsound()
{
play_sound(test_snd, 100); // works like snd_play(test_snd, 100, 0);
}

function balancedsound()
{
snd_play(test_snd, 100, 100); // works always
}

function balancedbeep()
{
snd_play(beep_snd, 100, -100); // works always
}

on_e = playersound;
on_s = normalsound;
on_d = balancedsound;
on_b = balancedbeep;


The comments describe what doesn't work. The same behavior occurs in all other cases I have tested, e.g. in event functions or in the office demo (if I enter "snd_play(msg_sound, 100, 100);" in the debug console, I can hear the sound; then I can hear the sound too, if I enter "snd_play(msg_sound, 100, 0);", but if I walk around between these calls, I can't hear the walking sound and the snd_play call with balance 0 doesn't work anymore too, until i play the same sound with a high balance value again).

Re: A5.24 downgrade: play_sound/snd_play problem [Re: zeroX1] #84400
08/05/06 00:36
08/05/06 00:36
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
I'll look over everything you have here and see if I
can understand what your saying.
I'm lost on what you mean by moving the sounds to the left or right?

I'll look in the template files as well and get a feel
of how they call the walk sounds and see if there is anything
there that is causing conflict with your code.


*** Teutonic Darkness ***


taking a second look I see 1 possible problem allready....
though in different functions you are calling the same sounds
So you may hit the desired key to play it.. but it dowsn't appear
to play because its allready playing.
Just thought I would point that one out...


Last edited by TeutonicDarkness; 08/05/06 00:53.
Re: A5.24 downgrade: play_sound/snd_play problem [Re: TeutonicDarkness] #84401
08/05/06 07:24
08/05/06 07:24
Joined: Jun 2003
Posts: 183
Austria/Österreich
zeroX1 Offline OP
Member
zeroX1  Offline OP
Member

Joined: Jun 2003
Posts: 183
Austria/Österreich
Playing the same sound simultaneously is not the problem, this works as long as the strange requirements are fulfilled. Moving the sound to the left and the right: I set the balance value of snd_play to play the sound in the left or the right speaker.

Re: A5.24 downgrade: play_sound/snd_play problem [Re: zeroX1] #84402
08/05/06 09:01
08/05/06 09:01
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

Playing the same sound simultaneously is not the problem, this works as long as the strange requirements are fulfilled. Moving the sound to the left and the right: I set the balance value of snd_play to play the sound in the left or the right speaker.




Well I tried your code out in the office level script..
Immediatly I noticed problems.
The E key function, and the D key function.

I fixed the D key function by adding -100 so it played on
right speaker as well.

Everthing seems perfect now in fact the only problem I experienced at all is with the E key function....

I'm still looking into that...



*** Teutonic Darkness ***


The added the lines player =me to my
player walk fight in war.wdl so I can now
use E ( coming from player position)
but hey... it works.

The only thing I'm seeing bad now
is your listener action and I think you would
have done better here if you did note use while (1) loops
and called your music by a seperate function








Last edited by TeutonicDarkness; 08/05/06 09:54.
Re: A5.24 downgrade: play_sound/snd_play problem [Re: TeutonicDarkness] #84403
08/05/06 12:21
08/05/06 12:21
Joined: Jun 2003
Posts: 183
Austria/Österreich
zeroX1 Offline OP
Member
zeroX1  Offline OP
Member

Joined: Jun 2003
Posts: 183
Austria/Österreich
I don't include any template scripts in this test script. What do you mean with "adding -100"? Did you change "snd_play(test_snd,100,100);" to "snd_play(test_snd,100,0);" or did you add another call with -100 as balance?
The problem seems to be specific to my computer if the play_sound calls work always on your one.

Re: A5.24 downgrade: play_sound/snd_play problem [Re: zeroX1] #84404
08/05/06 13:18
08/05/06 13:18
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

I don't include any template scripts in this test script. What do you mean with "adding -100"? Did you change "snd_play(test_snd,100,100);" to "snd_play(test_snd,100,0);" or did you add another call with -100 as balance?
The problem seems to be specific to my computer if the play_sound calls work always on your one.




Well I was just experimenting.. trying to test out
play_ent sound... I had trouble figuring out how to
use this one; and I was trying to do it a little different
than what you had there.
( to test out basic functionality)


On d key you had this function:
function balancedsound()
{ snd_play(test_snd, 100, 100); // works always
}

That is wrong as it will call it only to left speaker
use -100 to call to right speaker as well.

but perhaps you allready tried that?

If this dosnt work then I would start looking at my
computer becuse I just tested on 2 machines and its fine here...




*** Teutonic Darkness ***

Page 1 of 2 1 2

Moderated by  HeelX 

Gamestudio download | chip programmers | 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