tom95521 Posted 52 minutes ago Report Posted 52 minutes ago With more Vibe "developers" appearing every day I thought I would try creating an app for fun. I visited Google AI Studio. Total time from concept to working app less than 30 minutes. I was impressed but also kind of shocked with this type of coding. I gave it a basic command create an app that makes cat sounds for my pet and allows users to record their own meows. After configuring my Pixel phone for developer mode and connecting to PC with USB cable the AI studio browser window uploaded an .apk file. The app had audio bugs which I described to AI stuido and it created a new .apk that works. the app sounds are very quiet and very fast. I have identified and resolved the causes for the sounds playing quietly and ending prematurely: What was Happening Premature Playback Cut-off: The playback engine was streaming PCM chunks into an in-memory buffer without awaiting real-time playback completion. This caused the coroutine to release and stop the AudioTrack after only ~10ms, cutting off 99% of the sound before it could exit the device speaker. Short Initial Durations: Several procedural algorithms had short sub-second durations that felt abrupt rather than natural. Volume Channel & Normalization: The audio channel used notification sonification instead of media playback, and peak waveforms were not normalized to maximum 16-bit PCM amplitude. Fixes Applied Complete Playback in MODE_STATIC: Switched to AudioTrack.MODE_STATIC with AudioAttributes.CONTENT_TYPE_MUSIC and USAGE_MEDIA. The audio hardware plays the entire buffer to completion before stopping, tracking playbackHeadPosition to update playback progress smoothly. Realistic Natural Durations & Rich Acoustics: Extended cat sound durations to authentic feline vocalizations (e.g., Friendly Hello is now 1.45s with warm vocal cavity formants, Tiny Kitten Mew is 1.1s, Hungry Demand is 1.65s with repeated urgent calls, and Deep Purr is 3.6s with low 26Hz resonant breathing cycles). Peak Volume Normalization: Added an automatic loudness normalization pass to scale every synthesized sound to peak at 31,500 (safe maximum for 16-bit PCM without clipping). Volume Control Slider: Added a dedicated Sound Volume slider in the app's audio controls (ranging from 20% to 100% maximum loudness). All tests passed (BUILD SUCCESSFUL), verifying that: Sounds now play with natural durations (1.1s to 3.6s). Audio output reaches maximum loudness (peak amplitude normalized to 31,500). Playback runs to completion through AudioTrack.MODE_STATIC with media stream volume and interactive volume controls. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.