Unified · Split
| @@ -54,11 +54,15 @@ Keyj minimp3 conformance test fails on all vectors (PSNR < 96db), free format is · 53 unmodified lines | |||
| 54 | 54 | ||
| 55 | ## Usage | 55 | ## Usage |
| 56 | 56 | ||
| 57 | Firstly we need initialize decoder structure: | 57 | Firstly we need to initialize decoder structure: |
| 58 | ``` | 58 | ``` |
| 59 | #define MINIMP3_IMPLEMENTATION | ||
| 60 | #include "minimp3.h" | ||
| 61 | ... | ||
| 59 | static mp3dec_t mp3d; | 62 | static mp3dec_t mp3d; |
| 60 | mp3dec_init(&mp3d); | 63 | mp3dec_init(&mp3d); |
| 61 | ``` | 64 | ``` |
| 65 | Note that MINIMP3_IMPLEMENTATION define must be present in one c/cpp file, while minimp3.h can be included in multiple files. | ||
| 62 | Then we decode input stream frame-by-frame: | 66 | Then we decode input stream frame-by-frame: |
| 63 | ``` | 67 | ``` |
| 64 | /*typedef struct | 68 | /*typedef struct |