Fix potential overflow in Visualizer effect am: 46dc714d52 am: 8720f85196
am: bad0250dcb

Change-Id: I23660e1da14f232ff786f9ab78da3e26f301c1b2