|
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
MrGuest
OP
Serious User
|
OP
Serious User
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: jcl]
#351310
12/23/10 15:20
12/23/10 15:20
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
OP
Serious User
|
OP
Serious User
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 ).
|
|
|
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
MrGuest
OP
Serious User
|
OP
Serious User
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
|
|
|
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
MrGuest
OP
Serious User
|
OP
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
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
#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
#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
#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.
|
|
|
|