Esempio n. 1
0
bool JSAudioContext::JSSetter_volume(JSContext *cx, JS::MutableHandleValue vp)
{
    if (vp.isNumber()) {
        m_Audio->setVolume((float)vp.toNumber());
    }

    return true;
}
Esempio n. 2
0
bool JSAudioNodeCustomSource::JSSetter_position(JSContext *cx,
                                                JS::MutableHandleValue vp)
{
    if (vp.isNumber()) {
        this->getNode<AudioSourceCustom>()->seek(vp.toNumber());
    }

    return true;
}