Logo Search packages:      
Sourcecode: akode version File versions  Download package

void aKode::Player::setVolume ( float  v  ) 

Set the software-volume to v. Use a number between 0.0 and 1.0.

Valid in states Playing and Paused

Definition at line 563 of file player.cpp.

                              {
    if (f < 0.0 || f > 1.0) return;

    if (f != 1.0 && !d->volume_filter) {
        VolumeFilter *vf = new VolumeFilter();
        vf->setVolume(f);
        d->volume_filter = vf;
    }
    else if (f != 1.0) {
        d->volume_filter->setVolume(f);
    }
    else if (d->volume_filter) {
        VolumeFilter *f = d->volume_filter;
        d->volume_filter = 0;
        delete f;
    }
}


Generated by  Doxygen 1.6.0   Back to index