0
0

Some events appeared to be playing at an incorrect volume in the app I wrote. As an experiment, I then changed the example program to alter the event’s volume rather than the rpm parameter. The resulting behavior still confuses me.

It appears to increase the volume correctly if I change the setting in Designer to initally be lower than 0db. However, decreasing the value passed into setVolume does not appear to have any effect until it reaches zero. Is this correct?

  • You must to post comments
0
0

Doesn’t sound right. I’ll check that out.

Cheers,

  • You must to post comments
0
0

Did you have a chance to try this out? It is not blocking my work right now. I am more curious to see if I am attempting to use the volume functionality incorrectly.

  • You must to post comments
0
0

Sorry for the delay David, we’re very busy at the moment but I’ll check this out as soon as I can.

Cheers,

  • You must to post comments
0
0

Ok, just checked this out and it seems to be working fine for me. Modifying the simple_event example I can smoothly change the volume between 0.0 -> 1.0 using Event::setVolume and it sounds fine. Can you possibly post the code that reproduces the problem you’re experiencing?

Cheers,

  • You must to post comments
0
0

Here is the modified loop for my simple_event.

car->getVolume(&val);
do
{
    if (kbhit())
    {
        key = getch();

        if (key == 0x2c)
        {
            car->start();
            float curVol;
            result = car->getVolume(&curVol);
            ERRCHECK(result);

            val -= 0.01f;
            val = (val < 0.f) ? 0.f : val;
            result = car->setVolume(val);
            ERRCHECK(result);

            result = car->getVolume(&curVol);
            ERRCHECK(result);
        }
        else if (key == 0x2e)
        {
            float curVol;
            result = car->getVolume(&curVol);
            ERRCHECK(result);

            val += 0.01f;
            val = (val > 1.f) ? 1.f : val;
            result = car->setVolume(val);
            ERRCHECK(result);

            result = car->getVolume(&curVol);
            ERRCHECK(result);
        }
    }

    eventsystem->update();
    Sleep(15);

    printf("Car Volume = %.4f       \r", val);

} while (key != 27);
  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.