#include <StandardBitrates.h>
Definition at line 28 of file StandardBitrates.h.
◆ StandardBitrates()
Kwave::StandardBitrates::StandardBitrates |
( |
| ) |
|
◆ ~StandardBitrates()
Kwave::StandardBitrates::~StandardBitrates |
( |
| ) |
|
|
virtual |
◆ instance()
◆ nearest()
int Kwave::StandardBitrates::nearest |
( |
int |
rate | ) |
const |
|
virtual |
Returns the standard bitrate that is nearest to the given one
- Parameters
-
rate | given rate in [bits/second] |
- Returns
- nearest bitrate in [bits/second]
Definition at line 67 of file StandardBitrates.cpp.
Referenced by Kwave::VorbisDecoder::close().
70 int min_delta = INT_MAX;
72 foreach (
int value, *
this) {
73 int delta = (value > rate) ? (value-rate) : (rate-value);
74 if (!delta)
return rate;
76 if (delta < min_delta) {
The documentation for this class was generated from the following files: