FastLED 3.9.15
Loading...
Searching...
No Matches

◆ stb_vorbis_open_memory()

stb_vorbis * fl::third_party::vorbis::stb_vorbis_open_memory ( const unsigned char * data,
int32_t len,
int32_t * error,
const stb_vorbis_alloc * alloc )

Definition at line 4857 of file stb_vorbis.cpp.hpp.

4858{
4859
4860 stb_vorbis *f, p;
4861 if (!data) {
4862
4864 return nullptr;
4865 }
4866
4867 vorbis_init(&p, alloc);
4868 p.stream = (uint8 *) data;
4869 p.stream_end = (uint8 *) data + len;
4870 p.stream_start = (uint8 *) p.stream;
4871 p.stream_len = len;
4872 p.push_mode = false;
4873
4874 if (start_decoder(&p)) {
4875
4876 f = vorbis_alloc(&p);
4877 if (f) {
4878
4879 *f = p;
4881
4883 return f;
4884 }
4885
4886 }
4887
4888 if (error) *error = p.error;
4889 vorbis_deinit(&p);
4890 return nullptr;
4891}
static int32_t error(vorb *f, enum STBVorbisError e) FL_NOEXCEPT
static int32_t vorbis_pump_first_frame(stb_vorbis *f) FL_NOEXCEPT
static void vorbis_deinit(stb_vorbis *p) FL_NOEXCEPT
static int32_t start_decoder(vorb *f) FL_NOEXCEPT
static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z) FL_NOEXCEPT
static stb_vorbis * vorbis_alloc(stb_vorbis *f) FL_NOEXCEPT

References error(), fl::third_party::vorbis::stb_vorbis::error, FL_NOEXCEPT, fl::third_party::vorbis::stb_vorbis::push_mode, start_decoder(), fl::third_party::vorbis::stb_vorbis::stream, fl::third_party::vorbis::stb_vorbis::stream_end, fl::third_party::vorbis::stb_vorbis::stream_len, fl::third_party::vorbis::stb_vorbis::stream_start, VORBIS__no_error, vorbis_alloc(), vorbis_deinit(), vorbis_init(), vorbis_pump_first_frame(), and VORBIS_unexpected_eof.

Referenced by stb_vorbis_decode_memory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: