BRR sample encoder/decoder. More...
#include <spc_parser.h>
Static Public Member Functions | |
| static std::vector< int16_t > | Decode (const std::vector< uint8_t > &brr_data, int *loop_start=nullptr) |
| Decode BRR data to PCM samples. | |
| static std::vector< uint8_t > | Encode (const std::vector< int16_t > &pcm_data, int loop_start=-1) |
| Encode PCM samples to BRR format. | |
Static Private Attributes | |
| static constexpr int | kFilter1 [4] = {0, 15, 61, 115} |
| static constexpr int | kFilter2 [4] = {0, 4, 5, 6} |
| static constexpr int | kFilter3 [4] = {0, 0, 15, 13} |
BRR sample encoder/decoder.
Handles conversion between PCM audio and the SNES BRR format.
Definition at line 247 of file spc_parser.h.
|
static |
Decode BRR data to PCM samples.
| brr_data | The BRR-encoded data. |
| loop_start | Receives the loop start point. |
Definition at line 420 of file spc_parser.cc.
References kFilter1, kFilter2, and kFilter3.
Referenced by yaze::zelda3::music::MusicBank::LoadSamples().
|
static |
Encode PCM samples to BRR format.
| pcm_data | The source PCM samples. |
| loop_start | Loop start point (-1 for no loop). |
Definition at line 489 of file spc_parser.cc.
|
staticconstexprprivate |
Definition at line 269 of file spc_parser.h.
|
staticconstexprprivate |
Definition at line 270 of file spc_parser.h.
|
staticconstexprprivate |
Definition at line 271 of file spc_parser.h.