| 43 | static constexpr unsigned MPD_OSX_BUFFER_TIME_MS = 100; |
| 44 | |
| 45 | static auto |
| 46 | StreamDescriptionToString(const AudioStreamBasicDescription desc) noexcept |
| 47 | { |
| 48 | // Only convert the lpcm formats (nothing else supported / used by MPD) |
| 49 | assert(desc.mFormatID == kAudioFormatLinearPCM); |
| 50 | |
| 51 | return FmtBuffer<256>("{} channel {} {}interleaved {}-bit {} {} ({}Hz)", |
| 52 | desc.mChannelsPerFrame, |
| 53 | (desc.mFormatFlags & kAudioFormatFlagIsNonMixable) ? "" : "mixable", |
| 54 | (desc.mFormatFlags & kAudioFormatFlagIsNonInterleaved) ? "non-" : "", |
| 55 | desc.mBitsPerChannel, |
| 56 | (desc.mFormatFlags & kAudioFormatFlagIsFloat) ? "Float" : "SInt", |
| 57 | (desc.mFormatFlags & kAudioFormatFlagIsBigEndian) ? "BE" : "LE", |
| 58 | desc.mSampleRate); |
| 59 | } |
| 60 | |
| 61 | |
| 62 | struct OSXOutput final : AudioOutput { |
no outgoing calls
no test coverage detected