Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Im trying to play a footstep sound. However, it has to be played at a lower volume for the player that i control than for other players round me. So what i did is this:
Note that SoundManager::system == ISoundEngine. It appears that occasionally (well once every 2 - 3 seconds) the volume is changing. Note that at this stage, im not even testing with multiple players so it always sets the volume at 0.3. Is there a better way to handle this, am i doing it wrong or what? |
||||
|
You could try and see if it gets better if you start the sound paused, then set the volume and then unpause the sound. Could help. |
||||
|
Thanks, this seems to help indeed. I have another question though. If I drop an ISound instance, is its memory freed or do you recycle sounds. It seems a bit strange to me that a new ISound is allocated for each sound to be played. For instance when i want to play 10 sounds simultaneously at the same position i have to allocate 10 sounds, update the 10 sound's positions (even though they all have the same position) while only their sources (may) be different. I would expect that I could use 1 instance of ISound and have it play, for instance: 10 sounds. Thus ISound keeps a list internally playing sounds. Then when i set the position on this ISound, the position is set for all these sources. The current system is somewhat cumbersome when u want to track a lot of sounds, and i find it akward that i have to drop and reallocate a new sound for every trackable sound, unless of course that irrklang recycles them internally. regards, bk |
||||
|
Memory is freed as soon as the ISound object isn't needed anymore, in most cases that is when you stop and drop it. Independently of this, sound buffers are also shared between these, so a ISound object is usually only a few bytes (like 50 bytes or similar) in size. C++ has no problems creating and deallocating these at high frequencies, it works like that. |
||||
|
I know, wrong part of forum, but how to achieve this (player/footsteps sounds) in CopperCube/CopperLicht? |
||||
|
In CopperCube, that's much higher level, you would just play the sound with the position and/or volume. |
||||
|
is there an easier way to add footstep sounds to your player.. i tred add a sound with the behavior of when pressing a key which is w for walking forward but good lord that didn't work.. all that did was it playing the sound rapidly like a machine gun lol |
||||
|
Crackyourspeaker: If you want footstep sounds in CopperCube, I think this should be easier. Niko mentioned that he'll add support for it in a free update. Maybe you could ask him about it. Otherwise you could also do a bit of scripting and add it yourself. |
||||
|
yea if only I knew how to script.. I have no clue where to even start when It comes to that.. so frustrating but thanks, I need a developer to come to my house like seriously |
||||
|
Hi crachyourspeaker, I think I'll post a simple plugin for playing footstep sounds in the next weeks. What target are you using this for? |
||||
|
oh that would be great thanks, im using the FPS.. currently working on a horror game. I will be buying coppercube tomorrow so after months of trying out other engines, coppercube is by far the best. |
||||
|
wrote: Hi crachyourspeaker, I think I'll post a simple plugin for playing footstep sounds in the next weeks. What target are you using this for? Hello, are there any news about the plugin? I have the play steps sounds problem too (Windows exe). Regards Pittie |
||||
|
No, sorry, not yet. :/ |
||||
|
I am after the same as Crackyourspeaker. I would be glad if it would soon be possible to make these footsteps heard :-) |
|