MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / makePCMFormat

Function makePCMFormat

hal-plugin/AetherSDRDAX.cpp:204–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202// ── AudioStreamBasicDescription helper ──────────────────────────────────────
203
204static AudioStreamBasicDescription makePCMFormat(Float64 sampleRate, UInt32 channels)
205{
206 AudioStreamBasicDescription fmt{};
207 fmt.mSampleRate = sampleRate;
208 fmt.mFormatID = kAudioFormatLinearPCM;
209 fmt.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsPacked;
210 fmt.mBitsPerChannel = 32;
211 fmt.mChannelsPerFrame = channels;
212 fmt.mBytesPerFrame = channels * sizeof(float);
213 fmt.mFramesPerPacket = 1;
214 fmt.mBytesPerPacket = fmt.mBytesPerFrame;
215 return fmt;
216}
217
218// ── DriverRequestHandler: defers device creation until host is ready ─────────
219

Callers 1

OnInitializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected