SG Audio DLL
#41
Posted 14 June 2011 - 09:19 AM
And about that second problem... are you sure you're using it correctly? It's quite simple to make a mistake with group flags in which case something definitely isn't going to sound right.
#42
Posted 14 June 2011 - 01:58 PM
my_fx = sga_CreateFX(sound_path,0);
sga_SetGroupVol(0,0.5);
Flag 0 is the master flag that controls volume for all sounds right?
Well cpu utilization might not be a problem for p4 and later but since i'm developing games targeted for older computers, it might get noticeable on them.
I'll check CPU usage after some time. It shouldn't be a problem though since that's not a really big increase. I think the same increase will happen if you play 10 sounds instead of one. In that case, it's just the sound mixer doing its job. If you get 100% CPU usage and stuttering sounds, that might be a better reason to investigate.
And about that second problem... are you sure you're using it correctly? It's quite simple to make a mistake with group flags in which case something definitely isn't going to sound right.
#43
Posted 14 June 2011 - 03:17 PM
There are some question about sga_SetPlayOffset();
I'm trying to use it, and instead playing whole track from specified position it playing small piece of this track.
(You can view code examples on previous page.)
#44
Posted 17 June 2011 - 02:52 PM
Found the bug, thanks. Will be fixed and uploaded soon. You can work around that and add your own master volume group for now.sga_SetGroupVol(0,0.5);
Sorry, didn't notice your post. Looking at it now.You've ignored me.
It's quite possible that there are bugs (more than one) in those offset functions. I'll try to fix them soon.I'm trying to use it, and instead playing whole track from specified position it playing small piece of this track.
There is a problem though. I cannot work on the bugs at the moment because I'm trying to start selling software and the faster I succeed, the faster I can get back to fixing all these bugs.
In case you're interested, you'll find more info about the tool that I'm going to sell here: http://cragegames.co...exture-designer
#45
Posted 19 June 2011 - 02:20 AM
#46
Posted 22 June 2011 - 08:55 AM
#47
Posted 22 June 2011 - 09:21 AM
#48
Posted 23 June 2011 - 08:37 AM
#49
Posted 05 July 2011 - 02:53 AM
Whenever I try to use it the game hogs the CPU.
Edited by qwertybub3, 06 July 2011 - 03:07 AM.
#50
Posted 08 July 2011 - 10:53 PM
#51
Posted 16 July 2011 - 10:17 PM
Here's what i do to crash my game:
if(!sga_IsPlaying("snd/title.ogg")){
e_music = sga_TrackPlay( -1, "snd/title.ogg", 1, 0 );
}
it does work without the sga_IsPlaying()...
*edit*
i've also tried to create e_music first and used it like this:
if(sga_IsPlaying(e_music)){}
...same problem.
Edited by Atomhead, 17 July 2011 - 12:51 AM.
#52
Posted 27 July 2011 - 01:58 PM
#53
Posted 02 August 2011 - 06:31 AM
If its of any importance, my camera height is 60, so a regular person is about 64 units high.
Am i doing something wrong with the distance factor?
#54
Posted 03 August 2011 - 02:34 PM
As other users pointed out, in my experience the sga_IsPlaying function doesn't behave properly. In my case, it is literally hanging the game.
It's in a small 5 cycles loop right after the sga_Init() in the room creation event code. It ensures that a specific track isn't playing, and if it isn't, starts looping it. I'm initializing 5 emitters one after another.
The call seems to hang the game randomly on one of the 5 steps inside the loop.
I'm now trying to isolate the problem, I suspect it may be something like an unhandled exception, maybe caused that it gets called when the emitter hasn't been initialized yet OR there's some problem with a specific OGG file format. The fact is, I re-encoded every MP3 track in OGG format by using the same encoder.
To override the problem I'm using a single emitter, and keeping track of the last played music in a separate data structure but... well, I feel the sga_IsPlaying function really has something wrong, I have no idea if it's the wrapper or what
May you please doublecheck the function when possible?
Edited by Hiric, 03 August 2011 - 02:34 PM.
#55
Posted 09 August 2011 - 07:56 AM
#56
Posted 14 August 2011 - 04:11 AM
#57
Posted 21 August 2011 - 09:15 PM
Edited by mads2194, 25 August 2011 - 07:24 PM.
#58
Posted 25 August 2011 - 08:36 PM
I will have to disappear for a while but as soon as I resolve some problems of personal nature (expected to happen in 2 weeks / 2 months), I will add some bugs and fix some features... (or is it the other way around? :D ) I'm not working on the project at the moment but I hope to get back to it soon enough.
AFAIK, Ogg files can also be used for sound effects but at the moment it is impossible to determine their potential to stall the game while streaming the file from disk.
Armisticdoom: yes, but you have to make them all yourself.
thomasderoo:
#1 - remember that stereo sounds don't work together with 3D.
#2 - if you want it soon, I cannot implement that myself unfortunately and you will probably have to do that yourself, all I could do is throw some ideas about the design.
As far as I can tell at the moment, sga_IsPlaying should not eat up CPU time because it's basically an OpenAL call, just like many other functions. If some of the playing functions do something similar, I might have a clue as to where the problem might be, otherwise I will have none. There's one thing to remember though - sga_IsPlaying requires a valid ID of the emitter. Should just return 0 with everything else though...
While I'm solving my problems, perhaps you (those who have problems with sga_IsPlaying) could help me find the bug - all you need to do is to say how many cores/CPUs you're using and which OS.
#59
Posted 25 August 2011 - 08:55 PM
AFAIK, Ogg files can also be used for sound effects but at the moment it is impossible to determine their potential to stall the game while streaming the file from disk.
Sadly, they don`t play correctly for me
They either don`t play at all or sound weird.
Edited by mads2194, 25 August 2011 - 08:57 PM.
#60
Posted 25 August 2011 - 09:20 PM
AFAIK, Ogg files can also be used for sound effects but at the moment it is impossible to determine their potential to stall the game while streaming the file from disk.
Sadly, they don`t play correctly for me
They either don`t play at all or sound weird.
Use Audacity to verify the ogg is proper. I got a few on my end who converted mp3 to ogg with a defective converter. Use audacity for conversion
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











