≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Volume seems wrong
Posted by:
(you are not logged in)
Enter the missing letter in: "In?ernational"
(you are not logged in)
Text:
[quote][b]bk-[/b] wrote: 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: [code] void PlayerSounds::updateFootsteps(GameSession* session, GamePlayerMovement* movement, GPGroundInfo* groundInfo) if (mFootsteps) { if (mFootsteps->isFinished()) { mFootsteps->drop(); mFootsteps = NULL; } else { mFootsteps->setPosition(SoundManager::irrVec(groundInfo->getFloorPosition())); return; } } assert(!mFootsteps); ISoundSource* stepSound = Core::soundResources()->getFootsteps(groundInfo->getFeetMaterialType(), mStepsIndex); mStepsIndex = (mStepsIndex + 1) % 2; mFootsteps = SoundManager::system()->play3D(stepSound, SoundManager::irrVec(groundInfo->getFloorPosition()), false, false, true, false); if (mPlayer.getIsManagedHere()) mFootsteps->setVolume(0.3f); else mFootsteps->setVolume(1.0f); } [/code] 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?[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact