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

◆ stb_vorbis_open_pushdata()

stb_vorbis * fl::third_party::vorbis::stb_vorbis_open_pushdata ( const unsigned char * data,
int32_t data_len,
int32_t * data_used,
int32_t * error,
const stb_vorbis_alloc * alloc )

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

4276{
4277 stb_vorbis *f, p;
4278 vorbis_init(&p, alloc);
4279 p.stream = (uint8 *) data;
4280 p.stream_end = (uint8 *) data + data_len;
4281 p.push_mode = true;
4282 if (!start_decoder(&p)) {
4283 if (p.eof)
4285 else
4286 *error = p.error;
4287 vorbis_deinit(&p);
4288 return nullptr;
4289 }
4290 f = vorbis_alloc(&p);
4291 if (f) {
4292 *f = p;
4293 *data_used = (int32_t) (f->stream - data);
4294 *error = 0;
4295 return f;
4296 } else {
4297 vorbis_deinit(&p);
4298 return nullptr;
4299 }
4300}
static int32_t error(vorb *f, enum STBVorbisError e) 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
fl::i32 int32_t
Definition coder.h:220

References fl::third_party::vorbis::stb_vorbis::eof, 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, vorbis_alloc(), vorbis_deinit(), vorbis_init(), and VORBIS_need_more_data.

+ Here is the call graph for this function: