The number is a linear multiplier for values sent to the amplifier.

Since it’s linear, halving the number means that the amplitude of the waveform is cut in half.

The *power* you give to the speaker is cut by a factor of four, and the decibels would be -6.

If the volume is too high, clipping will occur, which will distort the sound.

However, what is “too high” depends highly on the sounds that are being played, because of the dynamic compression that proffieOS does.

The actual function looks sort of like this:

CalculatedVolume = \frac{| InputSample | + CalculatedVolume * 255}{256}

OutputSample = \frac{InputSample * Volume}{\sqrt{CalculatedVolume} + 100}

InputSample is the sum of all the currently playing sounds.

These two formulas are calculated for every output sample.

So, what have we learned:

- The milliwatts are proportional to the sqare of the volume
- The absolute milliwatt number depends on the sounds that are playing.

To complicate things further, there are several ways to measure watts that can be applied to speaker: average, rms, peak, etc.

The absolute maximum power that a proffieboard can put out would be with a square wave. If you adjust the volume to it’s maximum, it would output 5.1v continously, which in a 4 ohm load would be 6.5 watts. According to the formula above, a volume of 2996 or higher would make this happen. (I’m going to simplify that to 3000.)

So, for square waves, we get the following formula:

MaxWatts = 6.5 * 4^{log2(Volume / 3000)}

Here is a table of values based on this formula

volume |
max power |

3000 |
6.5 |

2800 |
5.7 |

2500 |
4.5 |

2400 |
4.2 |

2300 |
3.8 |

2200 |
3.5 |

2050 |
3.0 |

2000 |
2.9 |

1800 |
2.3 |

1700 |
2.0 |

1500 |
1.6 |

1200 |
1.0 |

1000 |
0.7 |

100 |
0.007 |

Note that these watt numbers aren’t likely to actually happen, but the might match up reasonably ok with the maximum wattage the speakers can handle.

Note that these are NOT RMS values, which are quite different.

Edit:

I thought about it some more, and I realized that the InputSample actually has a higher range than I was thinking, which means that maximum power (6.5w) can occur for lower volumes if enough sounds are being played at the same time. The values listed above are true for a *single* waveform. For multiple waveforms, things add up…