Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacAudioTools

Command-line utilities for macOS to configure and list audio devices using CoreAudio.

Tools

  • ConfAudioDev: Change the sample rate and bit depth of a specified audio device.
  • ListAudioDev: List all audio devices, showing their direction (input/output), channel count, sample rate, and bit depth.

Requirements

  • macOS 12.0 or later
  • Swift toolchain
  • Xcode command line tools (for swiftc, lipo, etc.)

Build Script

A helper script build.sh compiles both tools into universal Intel + ARM binaries.

# Make build script executable (once)
chmod +x build.sh

# Run build script
./build.sh

This produces:

  • ConfAudioDev (universal binary)
  • ListAudioDev (universal binary)

Usage

ConfAudioDev

Set the sample rate and bit depth for a device by name.

# Syntax:
./ConfAudioDev "<DeviceName>" "<bits>b<frequency>"

# Examples:
./ConfAudioDev "BlackHoleA" "24b96000"   # Set to 24-bit, 96 kHz
./ConfAudioDev "Built-in Output" "16b44100"  # Set to 16-bit, 44.1 kHz

ListAudioDev

List all audio devices with their current configuration.

./ListAudioDev

Sample Output

Device Name      Dir             Channels        SampleRate      BitDepth
---------------- -------------- -------------- -------------- --------------
Built-in Input   IN              2              44100Hz         16bit
Built-in Output  OUT             2              44100Hz         16bit
BlackHoleA       IN              2              48000Hz         24bit
BlackHoleA       OUT             2              48000Hz         24bit

Cleaning

The build script automatically removes intermediate architecture-specific binaries (*_x86_64, *_arm64).

Contributing

Feel free to file issues or pull requests to add new tools, features, or improvements.

License

MIT License. See LICENSE for details.

About

Command-line utilities for macOS to configure and list audio devices using CoreAudio.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages