Skip to content

Introduce AudioFormat value object to reduce parameter counts#8

Merged
pixelate merged 1 commit into
mainfrom
claude/add-audio-format-type
Mar 9, 2026
Merged

Introduce AudioFormat value object to reduce parameter counts#8
pixelate merged 1 commit into
mainfrom
claude/add-audio-format-type

Conversation

@pixelate
Copy link
Copy Markdown
Owner

@pixelate pixelate commented Mar 9, 2026

Summary

  • Adds AudioFormat = Data.define(:file_type, :sample_rate, :bit_depth) as a new value object
  • Adds Audio#format and Device#target_format as named constructors so call sites never build AudioFormat raw
  • Reduces FileConverter#convert from 9 params to 5, UI#conversion_progress from 6 to 2, UI#copy from 3 to 1
  • Updates tests for Audio, Device, and FileConverter to cover the new type and methods

Groups file_type, sample_rate, and bit_depth into a single AudioFormat
Data object. Adds Audio#format and Device#target_format as named
constructors, reducing FileConverter#convert from 9 to 5 params and
UI#conversion_progress from 6 to 2 params.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pixelate pixelate force-pushed the claude/add-audio-format-type branch from 64d2f81 to 9222181 Compare March 9, 2026 07:58
@pixelate pixelate merged commit e3d71dc into main Mar 9, 2026
@pixelate pixelate deleted the claude/add-audio-format-type branch March 9, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant