Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioCppTray

AudioCppTray is a lightweight Windows system-tray manager for the native audiocpp_server.exe process. It keeps the server lifecycle, status, logging, live log viewing, and log rotation in one small desktop application.

The application is written in modern C++ on top of the Win32 API. It does not require WinUI 3, .NET, or a web runtime.

Features

  • Windows system-tray icon with online/offline status.
  • Start, stop, and restart the AudioCpp server.
  • Prevents multiple tray instances with a named Windows mutex.
  • Optional startup with Windows.
  • Live log window with a dark theme and a monospace font.
  • Live updates without repeatedly displaying the existing log history.
  • Thread-safe in-memory log buffer with a 2,000-line limit.
  • Manual log rotation from the tray menu.
  • Optional automatic daily log rotation at a configurable time.
  • Settings window with editable paths, folder/file pickers, Save, and Cancel.
  • Configuration stored in the current user's Windows Registry.
  • English user interface by default with optional JSON localization.

Requirements

  • Windows 10 or later.
  • x64 Microsoft C++ compiler (Visual Studio or Visual Studio Build Tools).
  • Windows SDK and the standard Windows libraries used by the project.
  • audiocpp_server.exe.
  • A compatible server.json configuration file.

The server executable is not included in this repository. It must be supplied separately and placed in the configured server directory.

Runtime layout

A typical runtime directory looks like this:

AudioCppTray/
├── AudioCppTray.exe
├── audiocpp_server.exe
├── server.json
├── audiocpptray_locale.json
├── log.txt
└── log/

The default server directory is the directory containing AudioCppTray.exe. The default active log is log.txt, and rotated logs are written to the log subdirectory.

Building

Open an x64 Native Tools Command Prompt for Visual Studio, change to the project directory, and run:

build.bat

The script compiles the C++ sources with optimization enabled and links the result as a Windows GUI executable. The generated AudioCppTray.exe and intermediate object files are build outputs and are not part of the source history.

The build script compiles these modules:

AudioCppTray.cpp   Tray icon, menu, message loop, and application entry point
Server.cpp         audiocpp_server.exe process lifecycle
Status.cpp         Tray status icon and tooltip updates
AutoStart.cpp      Windows Startup shortcut management
AutoLogRoll.cpp    Automatic rotation state and daily execution tracking
Settings.cpp       Settings window and Registry persistence
Localization.cpp   Optional JSON-based user-interface translations
LogBuffer.cpp      Thread-safe circular in-memory log buffer
LogViewer.cpp      Dark live log window
LogWatcher.cpp     Incremental log-file watcher and rotation logic

Server startup

When the server is started, AudioCppTray launches the executable with the following command pattern:

audiocpp_server.exe --config server.json --log --log-file "<configured-log-file>"

The configured server directory is used as the process working directory, so the relative server.json path is resolved there. The server executable name is always audiocpp_server.exe.

Settings

The tray menu contains a Settings entry with these options:

  • Server execution directory.
  • Main active log file.
  • Rotated-log directory.
  • Server configuration file.
  • Automatic rotation enable/disable flag.
  • Automatic rotation hour and minute.

Saving settings applies them immediately. If the server is running, the application stops and restarts it so the new command-line parameters take effect. Cancelling closes the window without changing the stored values.

Settings are stored per Windows user under:

HKEY_CURRENT_USER\Software\AudioCppTray

The stored values are:

ServerFolder
LogFile
RotationFolder
ConfigFile
AutomaticLogRoll
RotationHour
RotationMinute

Localization

The default interface language is English. To customize the text, place audiocpptray_locale.json next to AudioCppTray.exe. The repository includes a human-editable template. Each entry contains the original English text and a translation field; fill in the translation field and leave it empty to use English for that entry. If the file is malformed, AudioCppTray shows an error message and continues with the built-in English text.

Live log viewer

The watcher checks the active log file periodically and reads only data added since the previous check. It detects a truncated or recreated log file and starts reading from the beginning of the new file.

The live viewer uses a dark background, light text, and a compact Consolas font. It automatically follows new entries only when the user is already at the bottom, allowing older entries to be inspected without being forced back down by incoming log lines.

Log rotation

Manual rotation

Selecting Roll log from the tray menu:

  1. Stops the server if it is running.

  2. Waits for the server process to release the active log file.

  3. Moves the active log into the rotation directory.

  4. Names the archived file with a timestamp, for example:

    log_2026-08-03_04-00-00-123.txt
    
  5. Creates a new empty active log file.

  6. Restarts the server if it was running before the operation.

Automatic rotation

The Automatic Log Rotation menu item enables or disables the feature. When enabled, AudioCppTray checks the configured time once per day and rotates the log only when the active log contains data. The daily execution marker is stored so the same day is not rotated repeatedly.

Repository contents

The repository contains the AudioCppTray source code, headers, resources, and the build script. Generated files such as .obj, .exe, .res, and runtime logs are excluded through .gitignore.

The external audiocpp_server.exe binary and its server configuration remain separate from this repository because they belong to the AudioCpp server project.

Release 0.2

Version v0.2 adds the configurable server configuration path, startup validation, reset of all settings and the Windows Startup shortcut, orderly shutdown of secondary windows, colored server status indicators, start/stop notifications, English UI text, and optional JSON localization through audiocpptray_locale.json.

Release 0.1

Version v0.1 is the first functional release and includes the tray manager, server lifecycle controls, settings persistence, live logging, manual log rotation, and optional scheduled log rotation.

About

Windows tray bar management tool for audiocpp_server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages