forked from bartvdbraak/blender
Set the listener properties correctly.
This commit is contained in:
parent
52799e4950
commit
29c0e74138
@ -285,7 +285,11 @@ static void sound_panel_listener(void)
|
|||||||
|
|
||||||
yco -= 30;
|
yco -= 30;
|
||||||
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Doppler: ",
|
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Doppler: ",
|
||||||
xco,yco,195,24,&G.listener->dopplervelocity, 0.0, 10.0, 1.0, 0, "Use this for scaling the doppler effect");
|
xco,yco,195,24,&G.listener->dopplerfactor, 0.0, 10.0, 1.0, 0, "Use this for scaling the doppler effect");
|
||||||
|
|
||||||
|
yco -=30;
|
||||||
|
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Velocity: ",
|
||||||
|
xco,yco,195,24,&G.listener->dopplervelocity,0.0,10000.0, 1.0,0, "Sets the propagation speed of sound");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ static void sound_init_listener(void)
|
|||||||
G.listener = MEM_callocN(sizeof(bSoundListener), "soundlistener");
|
G.listener = MEM_callocN(sizeof(bSoundListener), "soundlistener");
|
||||||
G.listener->gain = 1.0;
|
G.listener->gain = 1.0;
|
||||||
G.listener->dopplerfactor = 1.0;
|
G.listener->dopplerfactor = 1.0;
|
||||||
G.listener->dopplervelocity = 1.0;
|
G.listener->dopplervelocity = 340.29f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BIF_init(void)
|
void BIF_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user