| 13 | using namespace OpenApoc; |
| 14 | |
| 15 | static std::optional<AudioFormat::SampleFormat> sdlFormatToSampleFormat(SDL_AudioFormat format) |
| 16 | { |
| 17 | switch (format) |
| 18 | { |
| 19 | case AUDIO_S16LSB: |
| 20 | return AudioFormat::SampleFormat::PCM_SINT16; |
| 21 | case AUDIO_U8: |
| 22 | return AudioFormat::SampleFormat::PCM_UINT8; |
| 23 | default: |
| 24 | return {}; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | class WavSampleLoader : public SampleLoader |
| 29 | { |