| 398 | #define MAKEDWORD(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) |
| 399 | |
| 400 | result WavStream::loadwav(File * fp) |
| 401 | { |
| 402 | fp->seek(0); |
| 403 | drwav* decoder = drwav_open(drwav_read_func, drwav_seek_func, (void*)fp); |
| 404 | |
| 405 | if (decoder == NULL) |
| 406 | return FILE_LOAD_FAILED; |
| 407 | |
| 408 | mChannels = decoder->channels; |
| 409 | if (mChannels > MAX_CHANNELS) |
| 410 | { |
| 411 | mChannels = MAX_CHANNELS; |
| 412 | } |
| 413 | |
| 414 | mBaseSamplerate = (float)decoder->sampleRate; |
| 415 | mSampleCount = (unsigned int)decoder->totalSampleCount; |
| 416 | mFiletype = WAVSTREAM_WAV; |
| 417 | drwav_close(decoder); |
| 418 | |
| 419 | return SO_NO_ERROR; |
| 420 | } |
| 421 | |
| 422 | result WavStream::loadogg(File * fp) |
| 423 | { |
nothing calls this directly
no test coverage detected