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
3 registered members (kzhao, AndrewAMD, bigsmack), 824 guests, and 5 spiders.
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
snd_play, snd_loop, media_play no sound in 8.10 #351296
12/23/10 13:52
12/23/10 13:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
I posted in the updates/announcements that I no longer have sound no longer have sound in the latest update but it seems I'm the only one that does.

The sounds still work when I run SED with v8.03 with the exact same code. Is there any reason why this could be happening?



Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: MrGuest] #351297
12/23/10 14:16
12/23/10 14:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
snd_play uses DirectSound and media_play uses the media player. It's not likely that both suddenly cease to work on your PC. So, my first advice: shake the cable to your speakers, to find some loose contact. Second advice: Check your sound mixer. Open the mixer and observe the sliders when you start 8.10, and 8.03. Do they have different positions?

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: jcl] #351310
12/23/10 15:20
12/23/10 15:20
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
lol, no.

Also just tested a function that only works once a sound has been completed it's called straight away instead of waiting for the sound to finish.

Here's a little video to hopefully help a little (and no I didn't touch the speaker cables in between wink ).


Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: MrGuest] #351340
12/23/10 20:07
12/23/10 20:07
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Originally Posted By: MrGuest
Also just tested a function that only works once a sound has been completed it's called straight away instead of waiting for the sound to finish.

Are you sure that its really the sound and not a problem of your script? Do sounds not work only in your game, or in all gamestudio games and samples on your PC?

I had no problem with sounds in 8.10 so far. I use a lot sounds.

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: Tobias] #351383
12/24/10 01:46
12/24/10 01:46
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
I've tried it with 3 programs all worked in 8.03 and now none (sounds) work with 8.10.

I've tried uninstalling and reinstalling both versions, downloading latest sound drivers, reducing the code to only the minimal amount and crossed by fingers at every point.

The only sound I can get is by calling beep(), the thing I really don't get now though is why when using if(snd_playing(blah)) which works in 8.03 to delay the reload in the video, in 8.10 it doesn't delay at all as if it's not even being called.

Any ideas you guys can think of keep them coming, this one's really got me stumped frown

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: MrGuest] #351476
12/25/10 17:40
12/25/10 17:40
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Take a look at the volume panel while running the engine.
Is the volume slider for sounds changing during engine run?

In earlier times there existed a lot problems like this. Maybe there was some minimum dx version update in A8.10 and now this happens which did not happen before.

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: FBL] #351539
12/26/10 18:03
12/26/10 18:03
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Nope, the slider doesn't change at all, other programs are still able to play sounds and the beep() can still be heard in the engine. The main problem is that in 8.10 there is no acknowledgement of the sound being called thus letting the if(snd_playing) being ignored and continuing with the function.

Thanks for your ideas! grin

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: MrGuest] #351575
12/27/10 09:23
12/27/10 09:23
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Try the following small script:

function main()
{
SOUND* s = snd_create("mysound.wav");
wait(1);
dtimer();
snd_play(s,100,0);
printf("Time: %.3f ms",dtimer()/1000.);
}

Use some sound files that you have, with sounds of several seconds. Let us know which times you get with version 8.10 and 8.03.

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: jcl] #351620
12/27/10 14:34
12/27/10 14:34
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: jcl
Try the following small script:

function main()
{
SOUND* s = snd_create("mysound.wav");
wait(1);
dtimer();
snd_play(s,100,0);
printf("Time: %.3f ms",dtimer()/1000.);
}

Use some sound files that you have, with sounds of several seconds. Let us know which times you get with version 8.10 and 8.03.

ok, using 3 sounds from the template\sounds played 3 times

using script
Code:
#include <acknex.h>
#include <default.c>

function main(){
	SOUND* s = snd_create("aicarstart.wav");
	wait(1);
	dtimer();
	snd_play(s,100,0);
	printf("Time: %.3f ms",dtimer()/1000.);
}


aicarstart.wav
8.03 81.693, 71.648, 72.696
8.10 76.433, 76.986, 72.815

death.wav
8.03 72.460, 73.806, 72.087
8.10 72.410, 71.608, 73.551

earthquake.ogg
8.03 73.389, 75.272, 78.423
8.10 73.623, 72.811, 73.515


using script
Code:
#include <acknex.h>
#include <default.c>

function main(){
	SOUND* s = snd_create("earthquake.ogg");
	wait(1);
	dtimer();
	var h = snd_play(s,100,0);
	while(snd_playing(h)){ wait(1); }
	
	printf("Time: %.3f ms",dtimer()/1000.);
}


aicarstart
8.03 3470.388, 3469.319, 3469.138
8.10 3470.009, 3467.961, 3468.628

earthquake.ogg
8.03 7230.304, 7212.579, 7229.962
8.10 7229.771, 7229.408, 7230.942

These are 'now playing' as showing the delay on the timer which has highlighted another problem.

When using
Code:
#define PRAGMA_PATH "%EXE_DIR%\Resources\Sounds"

These get called using 8.03 but not 8.10. Having them in the same folder as the .c file acknowledges the files are playing (showing delay on the timer) but when in another folder using the above line skips the snd_playing function.

Still on sounds were heard at all in v8.10. Hope this sheds some more light on it?

No sounds were hurt in the testing of this bug. grin

Re: snd_play, snd_loop, media_play no sound in 8.10 [Re: MrGuest] #351645
12/27/10 17:01
12/27/10 17:01
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Your path is missing a semicolon; also, such a path does not exist in the installation folder anyway. It's "templates", not "resources". Can this be the reason why you don't hear sounds?

Page 1 of 2 1 2

Moderated by  jcl, Nems, Spirit, Tobias 

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