MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / loadflac

Method loadflac

extlibs/soloud/src/audiosource/wav/soloud_wavstream.cpp:446–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444 }
445
446 result WavStream::loadflac(File * fp)
447 {
448 fp->seek(0);
449 drflac* decoder = drflac_open(drflac_read_func, drflac_seek_func, (void*)fp);
450
451 if (decoder == NULL)
452 return FILE_LOAD_FAILED;
453
454 mChannels = decoder->channels;
455 if (mChannels > MAX_CHANNELS)
456 {
457 mChannels = MAX_CHANNELS;
458 }
459
460 mBaseSamplerate = (float)decoder->sampleRate;
461 mSampleCount = (unsigned int)decoder->totalPCMFrameCount;
462 mFiletype = WAVSTREAM_FLAC;
463 drflac_close(decoder);
464
465 return SO_NO_ERROR;
466 }
467
468 result WavStream::loadmp3(File * fp)
469 {

Callers

nothing calls this directly

Calls 3

drflac_openFunction · 0.85
drflac_closeFunction · 0.85
seekMethod · 0.45

Tested by

no test coverage detected