| 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 | { |
nothing calls this directly
no test coverage detected