-
Notifications
You must be signed in to change notification settings - Fork 95
Consolidate error domains into unified SFBAudioEngineErrorDomain #774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: sbooth <[email protected]>
Co-authored-by: sbooth <[email protected]>
Co-authored-by: sbooth <[email protected]>
Co-authored-by: sbooth <[email protected]>
|
@copilot Please move the defines for legacy compatibilty to SFBAudioEngineErrors.h and include the new error header in the implementation files where the errors are used. |
Co-authored-by: sbooth <[email protected]>
Done in commit e9b1045. All legacy compatibility defines have been moved to |
|
@copilot The only public header that should include SFBAudioEngineErrors.h is SFBAudioEngine.h. The other public headers do not need that include since it is not required. It should be included in the implementation files that need the error codes. |
…ntation files Co-authored-by: sbooth <[email protected]>
Done in commit ca9a043. Removed |
Consolidates 10 separate error domains (
SFBAudioDecoderErrorDomain,SFBDSDDecoderErrorDomain,SFBAudioEncoderErrorDomain, etc.) into a singleSFBAudioEngineErrorDomaincontaining all existing error codes.Changes
SFBAudioEngineErrorDomain(@"org.sbooth.AudioEngine") with 14 error codes organized by category (General, Format, Decoder, Encoder, File, I/O Source, Analyzer)SFBAudioEngineErrors.hvia#definemacrosSFBAudioEngine.hincludesSFBAudioEngineErrors.h- component public headers do not include itSFBAudioEngineErrors.hwhere error codes are usedSFBAudioEngineErrors.mreplaces 10 duplicate implementations (~220 lines removed)InvalidFormat,UnsupportedFormat,FormatNotSupported)Example
Existing code continues to work unchanged:
Both approaches produce identical errors due to macro aliasing defined in
SFBAudioEngineErrors.h.Benefits
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.